mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
chore: organize block unit test
add some extra context
This commit is contained in:
parent
71a0a43343
commit
7aef6d8a59
2 changed files with 44 additions and 33 deletions
|
@ -3,7 +3,7 @@
|
||||||
"files": null,
|
"files": null,
|
||||||
"lines": null
|
"lines": null
|
||||||
},
|
},
|
||||||
"generated_at": "2019-07-19T05:01:56Z",
|
"generated_at": "2019-07-27T05:16:42Z",
|
||||||
"plugins_used": [
|
"plugins_used": [
|
||||||
{
|
{
|
||||||
"name": "AWSKeyDetector"
|
"name": "AWSKeyDetector"
|
||||||
|
@ -270,12 +270,12 @@
|
||||||
"test/unit/modules/api/api.spec.ts": [
|
"test/unit/modules/api/api.spec.ts": [
|
||||||
{
|
{
|
||||||
"hashed_secret": "97752a468368b0d6b192140d6a140c38fd0cbd8b",
|
"hashed_secret": "97752a468368b0d6b192140d6a140c38fd0cbd8b",
|
||||||
"line_number": 287,
|
"line_number": 292,
|
||||||
"type": "Secret Keyword"
|
"type": "Secret Keyword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hashed_secret": "364bdf2ed77a8544d3b711a03b69eeadcc63c9d7",
|
"hashed_secret": "364bdf2ed77a8544d3b711a03b69eeadcc63c9d7",
|
||||||
"line_number": 786,
|
"line_number": 799,
|
||||||
"type": "Secret Keyword"
|
"type": "Secret Keyword"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2985,5 +2985,5 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"version": "0.12.2"
|
"version": "0.12.4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,10 @@ describe('endpoint unit test', () => {
|
||||||
npmjs: {
|
npmjs: {
|
||||||
url: `http://${DOMAIN_SERVERS}:${mockServerPort}`
|
url: `http://${DOMAIN_SERVERS}:${mockServerPort}`
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
logs: [
|
||||||
|
{ type: 'stdout', format: 'pretty', level: 'warn' }
|
||||||
|
]
|
||||||
}, 'api.spec.yaml');
|
}, 'api.spec.yaml');
|
||||||
|
|
||||||
app = await endPointAPI(configForTest);
|
app = await endPointAPI(configForTest);
|
||||||
|
@ -307,6 +310,12 @@ describe('endpoint unit test', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('should test package api', () => {
|
describe('should test package api', () => {
|
||||||
|
// The current behaviour depends of what's defined in the following configuration file.
|
||||||
|
// test/unit/partials/config/yaml/api.spec.yaml
|
||||||
|
// 'jquery':
|
||||||
|
// access: $all
|
||||||
|
// publish: $all
|
||||||
|
// proxy: npmjs
|
||||||
|
|
||||||
test('should fetch jquery package from remote uplink', (done) => {
|
test('should fetch jquery package from remote uplink', (done) => {
|
||||||
|
|
||||||
|
@ -392,6 +401,7 @@ describe('endpoint unit test', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('testing filters', () => {
|
||||||
test('be able to filter packages', (done) => {
|
test('be able to filter packages', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.get('/npm_test')
|
.get('/npm_test')
|
||||||
|
@ -422,6 +432,7 @@ describe('endpoint unit test', () => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
test('should forbid access to remote package', (done) => {
|
test('should forbid access to remote package', (done) => {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue