Skip to content

Commit

Permalink
feat: support slowTestThreshold option (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas authored May 16, 2022
1 parent 1c5e063 commit 05c0626
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 323 deletions.
58 changes: 0 additions & 58 deletions src/__tests__/__snapshots__/fail.test.ts.snap

This file was deleted.

42 changes: 0 additions & 42 deletions src/__tests__/__snapshots__/pass.test.ts.snap

This file was deleted.

158 changes: 158 additions & 0 deletions src/__tests__/__snapshots__/runTest.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`runs test with all failing results 1`] = `
Object {
"failureMessage": "<mocked failure message>",
"leaks": false,
"numFailingTests": 2,
"numPassingTests": 0,
"numPendingTests": 0,
"numTodoTests": 0,
"openHandles": Array [],
"perfStats": Object {
"end": 2800,
"runtime": 1800,
"slow": false,
"start": 1000,
},
"skipped": false,
"snapshot": Object {
"added": 0,
"fileDeleted": false,
"matched": 0,
"unchecked": 0,
"uncheckedKeys": Array [],
"unmatched": 0,
"updated": 0,
},
"testFilePath": "/path/to/some/failing.test.ts",
"testResults": Array [
Object {
"ancestorTitles": Array [],
"duration": 1800,
"failureDetails": Array [],
"failureMessages": Array [
"<mocked failure message>",
],
"fullName": "tsd typecheck",
"numPassingAsserts": 0,
"status": "failed",
"title": "tsd typecheck",
},
],
}
`;

exports[`runs test with all passing results 1`] = `
Object {
"failureMessage": null,
"leaks": false,
"numFailingTests": 0,
"numPassingTests": 2,
"numPendingTests": 0,
"numTodoTests": 0,
"openHandles": Array [],
"perfStats": Object {
"end": 2800,
"runtime": 1800,
"slow": false,
"start": 1000,
},
"skipped": false,
"snapshot": Object {
"added": 0,
"fileDeleted": false,
"matched": 0,
"unchecked": 0,
"uncheckedKeys": Array [],
"unmatched": 0,
"updated": 0,
},
"testFilePath": "/path/to/some/passing.test.ts",
"testResults": Array [
Object {
"ancestorTitles": Array [],
"duration": 1800,
"failureDetails": Array [],
"failureMessages": Array [],
"fullName": "tsd typecheck",
"numPassingAsserts": 1,
"status": "passed",
"title": "tsd typecheck",
},
],
}
`;

exports[`runs test with empty results 1`] = `
Object {
"failureMessage": null,
"leaks": false,
"numFailingTests": 0,
"numPassingTests": 0,
"numPendingTests": 0,
"numTodoTests": 0,
"openHandles": Array [],
"perfStats": Object {
"end": 2800,
"runtime": 1800,
"slow": false,
"start": 1000,
},
"skipped": false,
"snapshot": Object {
"added": 0,
"fileDeleted": false,
"matched": 0,
"unchecked": 0,
"uncheckedKeys": Array [],
"unmatched": 0,
"updated": 0,
},
"testFilePath": "/path/to/some/empty.test.ts",
"testResults": Array [],
}
`;

exports[`runs test with some failing results 1`] = `
Object {
"failureMessage": "<mocked failure message>",
"leaks": false,
"numFailingTests": 2,
"numPassingTests": 2,
"numPendingTests": 0,
"numTodoTests": 0,
"openHandles": Array [],
"perfStats": Object {
"end": 2800,
"runtime": 1800,
"slow": false,
"start": 1000,
},
"skipped": false,
"snapshot": Object {
"added": 0,
"fileDeleted": false,
"matched": 0,
"unchecked": 0,
"uncheckedKeys": Array [],
"unmatched": 0,
"updated": 0,
},
"testFilePath": "/path/to/some/failing.test.ts",
"testResults": Array [
Object {
"ancestorTitles": Array [],
"duration": 1800,
"failureDetails": Array [],
"failureMessages": Array [
"<mocked failure message>",
],
"fullName": "tsd typecheck",
"numPassingAsserts": 0,
"status": "failed",
"title": "tsd typecheck",
},
],
}
`;
27 changes: 0 additions & 27 deletions src/__tests__/fail.test.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/__tests__/pass.test.ts

This file was deleted.

Loading

0 comments on commit 05c0626

Please sign in to comment.