Giter VIP home page Giter VIP logo

elbow's People

Contributors

gochomugo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

elbow's Issues

Label before hook better

The setup hook is simply labelled setup. We should prefix elbow- for easier debugging of tests.

Support variables

Allow replacing variables in strings in schema. For example,

(partial schema file)

{
    "params": {
        "username": "${USERNAME}"
    }
}

The variables can be provided through the options object, or from environment variables. If a variable is not found, default to an empty string and log a warning to console.

testing status code

Having "status": 201 should test the http response's status code to be 201

Validate schemas

We should be validating the schemas that we load before using them in the tests. This will avoid difficult-to-debug errors when the schema is ill-formatted.

custom `it` label

The label used in it("label", function() {}); should be able to be customized or generated.

streaming over buffering

The current implementation reads all the schema files into memory, before executing the corresponding test for each of them. This will cause too much "buffering" (eat up memory resources) should the files be very many. We should instead use streaming to allow IO be more graceful.

sequence definition file

Using a file listing the sequence in which requests should be fired would help avoid having to rename multiple files when we wish to insert a request, in between some other requests.

schemas can not share endpoints

Should two or more schemas share the same endpoint, one of the schemas will overshadow the rest making them remain untested.

So why should two or more schemas share the same endpoint?

  1. It might be possible that the Http response returned depends on the data passed

Support other formats for the schema files other than JSON

It would be extremely helpful to support other formats, such as JSON5, while writing the schema files.

We would have the option options.extensions for specifying which formats are supported. By default it would equal ["json"]. For example, if the user wanted to support JSON5, they would specify options.extensions as ["json", "json5"]. They would go ahead and add the necessary require extensions to allow elbow to do something like require("./sample.json5").

Pass headers

Allow passing headers, just like params, thus headers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.