Skip to content

Commit

Permalink
test: convert repo test to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Jul 3, 2019
1 parent 7eb639a commit ee0e11d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
18 changes: 0 additions & 18 deletions test/git-repos.test.js

This file was deleted.

23 changes: 23 additions & 0 deletions test/git-repos.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as cli from '../src/cli/commands/';
import * as tap from 'tap';
const test = tap.test;

const urls = [
// a repo with no dependencies so it will never be vulnerable (2017-05-15)
'https://github.com/Snyk/vulndb-fixtures',
'https://github.com/Snyk/vulndb-fixtures.git',
'git@github.com:Snyk/vulndb-fixtures.git',
'Snyk/vulndb-fixtures.git',
];

urls.forEach((url) => {
test('snyk.test supports ' + url + ' structure', async (t) => {
try {
await cli.test(url);
t.pass('url worked');
} catch (err) {
t.threw();
t.end();
}
});
});

0 comments on commit ee0e11d

Please sign in to comment.