mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
test(unit): add unit test for basic searc
This commit is contained in:
parent
7c717359fc
commit
c08f257bf1
1 changed files with 22 additions and 0 deletions
|
@ -424,4 +424,26 @@ describe('endpoint unit test', () => {
|
|||
|
||||
});
|
||||
|
||||
describe('should test search api', () => {
|
||||
test('should perform a search', (done) => {
|
||||
const now = Date.now()
|
||||
const cacheTime = now - 6000000;
|
||||
request(app)
|
||||
.get('/-/all/since?stale=update_after&startkey=' + cacheTime)
|
||||
// .set('accept-encoding', 'application/json')
|
||||
// .set('content-type', 'application/json')
|
||||
//.expect('Content-Type', /json/)
|
||||
.expect(200)
|
||||
.end(function(err, res) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
//TODO: we have to catch the stream check whether it returns something
|
||||
// we should not spend much time on this api since is deprecated somehow.
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue