-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: migrate old-snyk-format to jest
- Loading branch information
Avishag Israeli
committed
Aug 23, 2021
1 parent
dd46c19
commit babe22a
Showing
2 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as policy from 'snyk-policy'; | ||
import { loadJson } from '../../utils'; | ||
import * as path from 'path'; | ||
|
||
it('test sensibly bails if gets an old .snyk format', async () => { | ||
const vulns2 = loadJson( | ||
path.resolve(__dirname, '../../fixtures/test-jsbin-vulns-updated.json'), | ||
); | ||
try { | ||
const config = await policy.load( | ||
path.resolve(__dirname, '../../fixtures/old-snyk-config'), | ||
); | ||
const res = await config.filter(vulns2); | ||
fail('was expecting an error, got ' + JSON.stringify(res)); | ||
} catch (e) { | ||
expect(e.code).toEqual('OLD_DOTFILE_FORMAT'); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.