The default settings should not use [].
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
+1
-2
@@ -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 {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user