Skip to content

Commit

Permalink
test: fix snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas committed Sep 25, 2021
1 parent 4ef0f63 commit f7546f1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 63 deletions.
9 changes: 9 additions & 0 deletions e2e/__tests__/__snapshots__/coverageProviderV8.test.ts.snap
Expand Up @@ -61,3 +61,12 @@ All files | 59.38 | 50 | 33.33 | 59.38 |
uncovered.js | 0 | 0 | 0 | 0 | 1-8
--------------|---------|----------|---------|---------|-------------------
`;

exports[`prints coverage with empty sourcemaps 1`] = `
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
types.ts | 100 | 100 | 100 | 100 |
----------|---------|----------|---------|---------|-------------------
`;
25 changes: 0 additions & 25 deletions e2e/__tests__/__snapshots__/v8Coverage.test.ts.snap

This file was deleted.

13 changes: 13 additions & 0 deletions e2e/__tests__/coverageProviderV8.test.ts
Expand Up @@ -11,6 +11,19 @@ import runJest from '../runJest';

const DIR = path.resolve(__dirname, '../coverage-provider-v8');

test('prints coverage with empty sourcemaps', () => {
const sourcemapDir = path.join(DIR, 'empty-sourcemap');

const {stdout, exitCode} = runJest(
sourcemapDir,
['--coverage', '--coverage-provider', 'v8'],
{stripAnsi: true},
);

expect(exitCode).toBe(0);
expect(wrap(stdout)).toMatchSnapshot();
});

test('prints correct coverage report, if a CJS module is put under test without transformation', () => {
const sourcemapDir = path.join(DIR, 'cjs-native-without-sourcemap');

Expand Down
38 changes: 0 additions & 38 deletions e2e/__tests__/v8Coverage.test.ts

This file was deleted.

0 comments on commit f7546f1

Please sign in to comment.