Skip to content

Commit

Permalink
test: migrate package-no-name test to jest
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahed Ahmed committed Jun 8, 2021
1 parent f1c1b24 commit 629dac2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
29 changes: 29 additions & 0 deletions test/jest/acceptance/snyk-test/package-no-name.spec.ts
@@ -0,0 +1,29 @@
import { createProject } from '../../util/createProject';
import { requireSnykToken } from '../../util/requireSnykToken';
import { runSnykCLI } from '../../util/runSnykCLI';

jest.setTimeout(1000 * 60);

test('packages with no name read dir', async () => {
const project = await createProject('package-sans-name');
const { code } = await runSnykCLI('test', {
cwd: project.path(),
env: {
...process.env,
SNYK_TOKEN: requireSnykToken(),
},
});
expect(code).toEqual(1);
});

test('packages with no name read dir with a lockfile', async () => {
const project = await createProject('package-sans-name-lockfile');
const { code } = await runSnykCLI('test', {
cwd: project.path(),
env: {
...process.env,
SNYK_TOKEN: requireSnykToken(),
},
});
expect(code).toEqual(1);
});
12 changes: 0 additions & 12 deletions test/package-no-name.test.ts

This file was deleted.

0 comments on commit 629dac2

Please sign in to comment.