Add ability to programmatically execute tests rather than a network bound request.
- Dominant language
- JavaScript
- Stars
- 898
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
The feature would allow developers to import their server lib and run tests locally without having to fire up a "live" http server. For context, one can look at the feature as it is supported by `supertest`.
```
var request = require('supertest');
var server = require('../server/server.js');
describe('Unfiltered item search', function() {
it('should return all configured items', function (done) {
request(server)
.get('/api/qc/items')
.set('Accept', 'application/json')
.expect(200)
.expect(function(res){
if(!res.body[0].itemNumber) {
console.log('it was true');
throw new Error('missing itemNumber');
}
})
.end(done);
});
});
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the server entry point referenced in the example, server/server.js, and compare the current network-bound request path with supertest's programmatic execution model. The issue does not name tests or implementation files, so first identify the request entry point and test setup; done means developers can import the server library and execute API tests without starting a live HTTP server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100