Skip to content

Commit

Permalink
perf: faster tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huafu committed Aug 12, 2018
1 parent 8dcafca commit 37a0187
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 253 deletions.
8 changes: 0 additions & 8 deletions e2e/__cases__/source-maps/echo.spec.ts

This file was deleted.

7 changes: 0 additions & 7 deletions e2e/__cases__/source-maps/echo.ts

This file was deleted.

23 changes: 23 additions & 0 deletions e2e/__cases__/source-maps/main.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { consoleLog, throwError } from './main';

describe('console.log()', () => {
test('from sources', () => {
consoleLog();
expect(true).toBe(true);
});
test('from tests', () => {
console.log('WITHIN TEST');
expect(true).toBe(true);
});
});

describe('throw new Error()', () => {
test('throws from sources', () => {
throwError();
expect(true).toBe(true);
});
test('throws from tests', () => {
throw new Error('WITHIN TEST');
expect(true).toBe(true);
});
});
7 changes: 7 additions & 0 deletions e2e/__cases__/source-maps/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function consoleLog() {
console.log('WITHIN SOURCE');
}

export function throwError() {
throw new Error('WITHIN SOURCE');
}
Loading

0 comments on commit 37a0187

Please sign in to comment.