From b93fcee7ffe0c667084f0a785c837f1b7574e87a Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Mon, 19 Sep 2022 16:36:45 +0200 Subject: [PATCH] Raise an error if the config file is not found. --- __tests__/config.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/__tests__/config.test.ts b/__tests__/config.test.ts index 1e09b52..63eb7d5 100644 --- a/__tests__/config.test.ts +++ b/__tests__/config.test.ts @@ -89,8 +89,6 @@ test('it reads an external config file', async () => { expect(options.allow_licenses).toEqual(['BSD', 'GPL 2']) }) -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([]) +test('raises an error when the the config file was not found', async () => { + expect(() => readConfigFile('fixtures/i-dont-exist')).toThrow() })