The default settings should not use [].

This commit is contained in:
Federico Builes
2022-06-08 18:28:10 +02:00
parent a51db20961
commit 20cca5c0c4
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ test('the default config path handles .yml and .yaml', async () => {
test('returns a default config when the config file was not found', async () => {
let options = readConfigFile('fixtures/i-dont-exist')
expect(options.fail_on_severity).toEqual('low')
expect(options.allow_licenses).toEqual([])
expect(options.allow_licenses).toEqual(undefined)
})
test('it reads config files with empty options', async () => {
Generated Vendored
+1 -2
View File
@@ -13706,8 +13706,7 @@ exports.CONFIG_FILEPATH = './.github/dependency-review.yml';
function readConfigFile(filePath = exports.CONFIG_FILEPATH) {
// By default we want to fail on all severities and allow all licenses.
const defaultOptions = {
fail_on_severity: 'low',
allow_licenses: []
fail_on_severity: 'low'
};
let data;
try {
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -10,8 +10,7 @@ export function readConfigFile(
): ConfigurationOptions {
// By default we want to fail on all severities and allow all licenses.
const defaultOptions: ConfigurationOptions = {
fail_on_severity: 'low',
allow_licenses: []
fail_on_severity: 'low'
}
let data