mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
test: remove unused var and change to toHaveLength
This commit is contained in:
parent
75c0e1e4ec
commit
d0d74fa21b
@ -562,7 +562,7 @@ describe('endpoint unit test', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('should test star api', () => {
|
describe('should test star and stars api', () => {
|
||||||
test('should star a package', (done) => {
|
test('should star a package', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.put('/@scope%2fpk1-test')
|
.put('/@scope%2fpk1-test')
|
||||||
@ -601,7 +601,6 @@ describe('endpoint unit test', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
test('should retrieve stars list with credentials', async (done) => {
|
test('should retrieve stars list with credentials', async (done) => {
|
||||||
const credentials = { name: 'star_user', password: 'secretPass' };
|
const credentials = { name: 'star_user', password: 'secretPass' };
|
||||||
@ -616,7 +615,7 @@ describe('endpoint unit test', () => {
|
|||||||
[credentials.name]: true
|
[credentials.name]: true
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.expect(HTTP_STATUS.OK).end(function(err, res) {
|
.expect(HTTP_STATUS.OK).end(function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
expect(err).toBeNull();
|
expect(err).toBeNull();
|
||||||
return done(err);
|
return done(err);
|
||||||
@ -635,11 +634,14 @@ describe('endpoint unit test', () => {
|
|||||||
return done(err);
|
return done(err);
|
||||||
}
|
}
|
||||||
expect(res.body.rows).toBeDefined();
|
expect(res.body.rows).toBeDefined();
|
||||||
expect(res.body.rows.length).toBeGreaterThan(0);
|
expect(res.body.rows).toHaveLength(1);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test('should unpublish a new package with credentials', async (done) => {
|
test('should unpublish a new package with credentials', async (done) => {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user