mirror of https://github.com/facebook/jest.git
standardize filenames in e2e (#7471)
* standardizing file names to fit facebook standards * updating filenames to better fit facebook standards * standardizing jest-runner filenames to fit facebook standards * standardizing file names in /e2e/before-all-filtered * resolving naming discrepencies inside of files * standardizing filenames in e2e/before-each-queue and corresponding tests * standardizing several tests in ./e2e/__test__/ * standardizing filenames for babel-plugin-jest-hoist and related test files * standardizing file-names for folders 'browser-support' and 'clear-cache' and their corresponding test files * resolving issue with karma referencing non-standard browserTest * resolving issue with karma referencing non-standard browserTest filename * standardizing file names to fit facebook standards * updating filenames to better fit facebook standards * Add issue template labels (#7470) * Add issue template labels * Lint * standardizing jest-runner filenames to fit facebook standards * allow `bail` setting to control when to bail out of a failing test run (#7335) * standardizing file names in /e2e/before-all-filtered * resolving naming discrepencies inside of files * standardizing filenames in e2e/before-each-queue and corresponding tests * standardizing several tests in ./e2e/__test__/ * standardizing filenames for babel-plugin-jest-hoist and related test files * standardizing file-names for folders 'browser-support' and 'clear-cache' and their corresponding test files * resolving issue with karma referencing non-standard browserTest * resolving issue with karma referencing non-standard browserTest filename * standardizing file names in e2e/__test__ * standardizing file names in compare-dom-nodes * standardizing file names for coverage-report and coverage-remap * updating case sensitive filenames * renaming files to fit facebook standards * adding case sensitive file changes * resolving dependency issues after renaming case sensitive files. * standardizing file names to fit facebook standards * adjusting file names and snapshots to fit facebook standards * adjusting file names to fit facebook standards * resolves bug with nodeAssertionError not being found by test suite * changing references to match file name * changing file name to check test-jest-circus * readding a previously deleted snapshot * Update e2e/bad-source-map/__tests__/badSourceMap.js comment to reflect new file name Co-Authored-By: GGonryun <amodestduck@gmail.com> * improving file naming conventions letters g & j * changing filename to fit facebook standards * renaming filenames to fit facebook standards for 'L' * renaming filenames to fit facebook standards for 'M' * renaming filenames to fit facebook standards for 'N' * resolving leftover merge conflicts * reverting error in naming by changing filename back to uppercase * renaming filenames 'O' to fit facebook standards. * renaming filenames 'P' to fit facebook standards. * renaming filenames 'R' to fit facebook standards. * renaming filenames 'S' to fit facebook standards. * changing regex to match temporary folder name * renaming filenames 'T' to fit facebook standards. * renaming filenames 'U' to fit facebook standards. * renaming filenames 'V' to fit facebook standards. * renaming filenames 'W' to fit facebook standards. * updating snapshots to reflect standardized file names * Rename e2e/test-name-pattern-skipped/package.json to e2e/test-name-pattern-temp/package.json * Rename e2e/test-name-pattern/package.json to e2e/test-name-pattern-skipped/package.json * Rename e2e/test-name-pattern-skipped/package.json to e2e/test-name-pattern.package.json * Rename e2e/test-name-pattern-temp/package.json to e2e/test-name-pattern/package.json * Rename e2e/test-name-pattern.package.json to e2e/test-name-pattern-skipped/package.json * removing left over files and adjusting file names previously missed * deleting more leftover files
This commit is contained in:
parent
e1c226c705
commit
5f4e5cd9dd
|
@ -147,7 +147,7 @@
|
|||
- `[jest-haste-map]` Refactor `dependencyExtractor` and tests ([#7385](https://github.com/facebook/jest/pull/7385))
|
||||
- `[docs]` Clearify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369))
|
||||
- `[docs]` Clarify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369))
|
||||
- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467), [#7464](https://github.com/facebook/jest/pull/7464))
|
||||
- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467), [#7464](https://github.com/facebook/jest/pull/7464)), [#7471](https://github.com/facebook/jest/pull/7471))
|
||||
- `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440))
|
||||
- `[docs]` Removed misleading text about `describe()` grouping together tests into a test suite ([#7434](https://github.com/facebook/jest/pull/7434))
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Correct BeforeAll run ensures the BeforeAll of ignored suite is not run 1`] = `
|
||||
" console.log __tests__/before-all-filtered.test.js:5
|
||||
beforeAll 1
|
||||
|
||||
console.log __tests__/before-all-filtered.test.js:8
|
||||
beforeEach 1
|
||||
|
||||
console.log __tests__/before-all-filtered.test.js:17
|
||||
It Foo
|
||||
|
||||
console.log __tests__/before-all-filtered.test.js:11
|
||||
afterEach 1
|
||||
|
||||
console.log __tests__/before-all-filtered.test.js:14
|
||||
afterAll 1
|
||||
"
|
||||
`;
|
|
@ -1,19 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Correct beforeEach order ensures the correct order for beforeEach 1`] = `
|
||||
" console.log __tests__/before-each-queue.test.js:5
|
||||
BeforeEach
|
||||
|
||||
console.log __tests__/before-each-queue.test.js:9
|
||||
It Foo
|
||||
|
||||
console.log __tests__/before-each-queue.test.js:12
|
||||
BeforeEach Inline Foo
|
||||
|
||||
console.log __tests__/before-each-queue.test.js:5
|
||||
BeforeEach
|
||||
|
||||
console.log __tests__/before-each-queue.test.js:17
|
||||
It Bar
|
||||
"
|
||||
`;
|
|
@ -0,0 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Correct BeforeAll run ensures the BeforeAll of ignored suite is not run 1`] = `
|
||||
" console.log __tests__/beforeAllFiltered.test.js:5
|
||||
beforeAll 1
|
||||
|
||||
console.log __tests__/beforeAllFiltered.test.js:8
|
||||
beforeEach 1
|
||||
|
||||
console.log __tests__/beforeAllFiltered.test.js:17
|
||||
It Foo
|
||||
|
||||
console.log __tests__/beforeAllFiltered.test.js:11
|
||||
afterEach 1
|
||||
|
||||
console.log __tests__/beforeAllFiltered.test.js:14
|
||||
afterAll 1
|
||||
"
|
||||
`;
|
|
@ -0,0 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Correct beforeEach order ensures the correct order for beforeEach 1`] = `
|
||||
" console.log __tests__/beforeEachQueue.test.js:5
|
||||
BeforeEach
|
||||
|
||||
console.log __tests__/beforeEachQueue.test.js:9
|
||||
It Foo
|
||||
|
||||
console.log __tests__/beforeEachQueue.test.js:12
|
||||
BeforeEach Inline Foo
|
||||
|
||||
console.log __tests__/beforeEachQueue.test.js:5
|
||||
BeforeEach
|
||||
|
||||
console.log __tests__/beforeEachQueue.test.js:17
|
||||
It Bar
|
||||
"
|
||||
`;
|
|
@ -6,9 +6,9 @@ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|
|||
---------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 100 | 100 | 100 | 100 | |
|
||||
a | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
b | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
---------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
||||
|
@ -17,7 +17,7 @@ exports[`collects coverage only from multiple specified files 1`] = `
|
|||
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|
||||
--------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 100 | 100 | 100 | 100 | |
|
||||
OtherFile.js | 100 | 100 | 100 | 100 | |
|
||||
otherFile.js | 100 | 100 | 100 | 100 | |
|
||||
setup.js | 100 | 100 | 100 | 100 | |
|
||||
--------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
@ -36,7 +36,7 @@ exports[`collects coverage only from specified files avoiding dependencies 1`] =
|
|||
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|
||||
----------|----------|----------|----------|----------|-------------------|
|
||||
All files | 85.71 | 100 | 50 | 100 | |
|
||||
Sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
----------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
||||
|
@ -48,14 +48,14 @@ File | % Stmts | % Branch | % Funcs | % Lines
|
|||
-------------------------------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 56.52 | 0 | 50 | 55.56 | |
|
||||
coverage-report | 41.18 | 0 | 25 | 42.86 | |
|
||||
OtherFile.js | 100 | 100 | 100 | 100 | |
|
||||
Sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
|
||||
otherFile.js | 100 | 100 | 100 | 100 | |
|
||||
sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
-------------------------------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
||||
|
@ -74,14 +74,14 @@ File | % Stmts | % Branch | % Funcs | % Lines
|
|||
-------------------------------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 56.52 | 0 | 50 | 55.56 | |
|
||||
coverage-report | 41.18 | 0 | 25 | 42.86 | |
|
||||
OtherFile.js | 100 | 100 | 100 | 100 | |
|
||||
Sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
|
||||
otherFile.js | 100 | 100 | 100 | 100 | |
|
||||
sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
-------------------------------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
||||
|
@ -98,14 +98,14 @@ File | % Stmts | % Branch | % Funcs | % Lines
|
|||
-------------------------------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 56.52 | 0 | 50 | 55.56 | |
|
||||
coverage-report | 41.18 | 0 | 25 | 42.86 | |
|
||||
OtherFile.js | 100 | 100 | 100 | 100 | |
|
||||
Sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
|
||||
otherFile.js | 100 | 100 | 100 | 100 | |
|
||||
sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
-------------------------------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
||||
|
@ -115,14 +115,14 @@ File | % Stmts | % Branch | % Funcs | % Lines
|
|||
-------------------------------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 56.52 | 0 | 50 | 55.56 | |
|
||||
coverage-report | 41.18 | 0 | 25 | 42.86 | |
|
||||
OtherFile.js | 100 | 100 | 100 | 100 | |
|
||||
Sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
|
||||
otherFile.js | 100 | 100 | 100 | 100 | |
|
||||
sum.js | 85.71 | 100 | 50 | 100 | |
|
||||
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
|
||||
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
|
||||
Identical.js | 100 | 100 | 100 | 100 | |
|
||||
identical.js | 100 | 100 | 100 | 100 | |
|
||||
-------------------------------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`works with custom matchers 1`] = `
|
||||
"FAIL __tests__/custom_matcher.test.js
|
||||
"FAIL __tests__/customMatcher.test.js
|
||||
Custom matcher
|
||||
✓ passes
|
||||
✓ fails
|
||||
|
@ -19,12 +19,12 @@ exports[`works with custom matchers 1`] = `
|
|||
47 |
|
||||
48 | // This expecation fails due to an error we throw (intentionally)
|
||||
|
||||
at Error (__tests__/custom_matcher.test.js:45:13)
|
||||
at baz (__tests__/custom_matcher.test.js:43:23)
|
||||
at bar (__tests__/custom_matcher.test.js:42:23)
|
||||
at foo (__tests__/custom_matcher.test.js:52:7)
|
||||
at Object.callback (__tests__/custom_matcher.test.js:11:18)
|
||||
at Object.toCustomMatch (__tests__/custom_matcher.test.js:53:8)
|
||||
at Error (__tests__/customMatcher.test.js:45:13)
|
||||
at baz (__tests__/customMatcher.test.js:43:23)
|
||||
at bar (__tests__/customMatcher.test.js:42:23)
|
||||
at foo (__tests__/customMatcher.test.js:52:7)
|
||||
at Object.callback (__tests__/customMatcher.test.js:11:18)
|
||||
at Object.toCustomMatch (__tests__/customMatcher.test.js:53:8)
|
||||
|
||||
"
|
||||
`;
|
|
@ -35,7 +35,7 @@ exports[`formats args with pretty format when given %p 1`] = `
|
|||
`;
|
||||
|
||||
exports[`runs only the describe.only.each tests 1`] = `
|
||||
"PASS __tests__/describe-only.test.js
|
||||
"PASS __tests__/describeOnly.test.js
|
||||
passes all rows expected true == true
|
||||
✓ passes
|
||||
✓ passes
|
||||
|
@ -46,7 +46,7 @@ exports[`runs only the describe.only.each tests 1`] = `
|
|||
`;
|
||||
|
||||
exports[`shows error message when not enough arguments are supplied to tests 1`] = `
|
||||
"FAIL __tests__/each-exception.test.js
|
||||
"FAIL __tests__/eachException.test.js
|
||||
✕ throws exception when one argument too few are supplied $left == $right
|
||||
✕ throws exception when not enough arguments are supplied $left == $right
|
||||
|
||||
|
@ -72,7 +72,7 @@ exports[`shows error message when not enough arguments are supplied to tests 1`]
|
|||
10 | \${true} | \${true}
|
||||
11 | \${true}
|
||||
|
||||
at Object.<anonymous> (__tests__/each-exception.test.js:8:1)
|
||||
at Object.<anonymous> (__tests__/eachException.test.js:8:1)
|
||||
|
||||
● throws exception when not enough arguments are supplied $left == $right
|
||||
|
||||
|
@ -95,13 +95,13 @@ exports[`shows error message when not enough arguments are supplied to tests 1`]
|
|||
21 | \${true} | \${true}
|
||||
22 | \`(
|
||||
|
||||
at Object.<anonymous> (__tests__/each-exception.test.js:19:1)
|
||||
at Object.<anonymous> (__tests__/eachException.test.js:19:1)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`shows only the tests with .only as being ran 1`] = `
|
||||
"PASS __tests__/each-only.test.js
|
||||
"PASS __tests__/eachOnly.test.js
|
||||
✓ passes one row expected true == true
|
||||
✓ passes one row expected true == true
|
||||
✓ passes one row expected true == true
|
||||
|
@ -112,7 +112,7 @@ exports[`shows only the tests with .only as being ran 1`] = `
|
|||
`;
|
||||
|
||||
exports[`shows only the tests without .skip as being ran 1`] = `
|
||||
"PASS __tests__/each-skip.test.js
|
||||
"PASS __tests__/eachSkip.test.js
|
||||
✓ passes one row expected true == true
|
||||
✓ passes one row expected true == true
|
||||
✓ passes one row expected true == true
|
||||
|
|
|
@ -7,13 +7,13 @@ Object {
|
|||
Tests: 1 skipped, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /hook-in-describe-with-skipped-test.test.js/i.",
|
||||
Ran all test suites matching /hookInDescribeWithSkippedTest.test.js/i.",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`hook in empty describe 1`] = `
|
||||
Object {
|
||||
"rest": "FAIL __tests__/hook-in-empty-describe.test.js
|
||||
"rest": "FAIL __tests__/hookInEmptyDescribe.test.js
|
||||
|
||||
|
||||
● Test suite failed to run
|
||||
|
@ -28,22 +28,22 @@ Object {
|
|||
11 |
|
||||
12 | describe('another block with tests', () => {
|
||||
|
||||
at beforeEach (__tests__/hook-in-empty-describe.test.js:9:3)
|
||||
at Object.describe (__tests__/hook-in-empty-describe.test.js:8:1)
|
||||
at beforeEach (__tests__/hookInEmptyDescribe.test.js:9:3)
|
||||
at Object.describe (__tests__/hookInEmptyDescribe.test.js:8:1)
|
||||
|
||||
",
|
||||
"summary": "Test Suites: 1 failed, 1 total
|
||||
Tests: 1 passed, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /hook-in-empty-describe.test.js/i.
|
||||
Ran all test suites matching /hookInEmptyDescribe.test.js/i.
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`hook in empty nested describe 1`] = `
|
||||
Object {
|
||||
"rest": "FAIL __tests__/hook-in-empty-nested-describe.test.js
|
||||
"rest": "FAIL __tests__/hookInEmptyNestedDescribe.test.js
|
||||
|
||||
|
||||
● Test suite failed to run
|
||||
|
@ -58,22 +58,22 @@ Object {
|
|||
11 | });
|
||||
12 |
|
||||
|
||||
at beforeEach (__tests__/hook-in-empty-nested-describe.test.js:9:3)
|
||||
at Object.describe (__tests__/hook-in-empty-nested-describe.test.js:8:1)
|
||||
at beforeEach (__tests__/hookInEmptyNestedDescribe.test.js:9:3)
|
||||
at Object.describe (__tests__/hookInEmptyNestedDescribe.test.js:8:1)
|
||||
|
||||
",
|
||||
"summary": "Test Suites: 1 failed, 1 total
|
||||
Tests: 1 passed, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /hook-in-empty-nested-describe.test.js/i.
|
||||
Ran all test suites matching /hookInEmptyNestedDescribe.test.js/i.
|
||||
",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`multiple hooks in empty describe 1`] = `
|
||||
Object {
|
||||
"rest": "FAIL __tests__/multiple-hooks-in-empty-describe.test.js
|
||||
"rest": "FAIL __tests__/multipleHooksInEmptyDescribe.test.js
|
||||
|
||||
|
||||
● Test suite failed to run
|
||||
|
@ -88,8 +88,8 @@ Object {
|
|||
11 | afterAll(() => {});
|
||||
12 | beforeAll(() => {});
|
||||
|
||||
at beforeEach (__tests__/multiple-hooks-in-empty-describe.test.js:9:3)
|
||||
at Object.describe (__tests__/multiple-hooks-in-empty-describe.test.js:8:1)
|
||||
at beforeEach (__tests__/multipleHooksInEmptyDescribe.test.js:9:3)
|
||||
at Object.describe (__tests__/multipleHooksInEmptyDescribe.test.js:8:1)
|
||||
|
||||
● Test suite failed to run
|
||||
|
||||
|
@ -103,8 +103,8 @@ Object {
|
|||
12 | beforeAll(() => {});
|
||||
13 | });
|
||||
|
||||
at afterEach (__tests__/multiple-hooks-in-empty-describe.test.js:10:3)
|
||||
at Object.describe (__tests__/multiple-hooks-in-empty-describe.test.js:8:1)
|
||||
at afterEach (__tests__/multipleHooksInEmptyDescribe.test.js:10:3)
|
||||
at Object.describe (__tests__/multipleHooksInEmptyDescribe.test.js:8:1)
|
||||
|
||||
● Test suite failed to run
|
||||
|
||||
|
@ -118,8 +118,8 @@ Object {
|
|||
13 | });
|
||||
14 |
|
||||
|
||||
at afterAll (__tests__/multiple-hooks-in-empty-describe.test.js:11:3)
|
||||
at Object.describe (__tests__/multiple-hooks-in-empty-describe.test.js:8:1)
|
||||
at afterAll (__tests__/multipleHooksInEmptyDescribe.test.js:11:3)
|
||||
at Object.describe (__tests__/multipleHooksInEmptyDescribe.test.js:8:1)
|
||||
|
||||
● Test suite failed to run
|
||||
|
||||
|
@ -133,15 +133,15 @@ Object {
|
|||
14 |
|
||||
15 | describe('another block with tests', () => {
|
||||
|
||||
at beforeAll (__tests__/multiple-hooks-in-empty-describe.test.js:12:3)
|
||||
at Object.describe (__tests__/multiple-hooks-in-empty-describe.test.js:8:1)
|
||||
at beforeAll (__tests__/multipleHooksInEmptyDescribe.test.js:12:3)
|
||||
at Object.describe (__tests__/multipleHooksInEmptyDescribe.test.js:8:1)
|
||||
|
||||
",
|
||||
"summary": "Test Suites: 1 failed, 1 total
|
||||
Tests: 1 passed, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /multiple-hooks-in-empty-describe.test.js/i.
|
||||
Ran all test suites matching /multipleHooksInEmptyDescribe.test.js/i.
|
||||
",
|
||||
}
|
||||
`;
|
|
@ -1,22 +1,22 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`DEFAULT_TIMEOUT_INTERVAL.test.js errors in errorOnDeprecated mode 1`] = `
|
||||
"FAIL __tests__/DEFAULT_TIMEOUT_INTERVAL.test.js
|
||||
✕ DEFAULT_TIMEOUT_INTERVAL
|
||||
exports[`defaultTimeoutInterval.test.js errors in errorOnDeprecated mode 1`] = `
|
||||
"FAIL __tests__/defaultTimeoutInterval.test.js
|
||||
✕ Default Timeout Interval
|
||||
|
||||
● DEFAULT_TIMEOUT_INTERVAL
|
||||
● Default Timeout Interval
|
||||
|
||||
Illegal usage of \`jasmine.DEFAULT_TIMEOUT_INTERVAL\`, prefer \`jest.setTimeout\`.
|
||||
|
||||
8 |
|
||||
9 | test('DEFAULT_TIMEOUT_INTERVAL', () => {
|
||||
9 | test('Default Timeout Interval', () => {
|
||||
> 10 | jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
|
||||
| ^
|
||||
11 | expect(true).toBe(true);
|
||||
12 | });
|
||||
13 |
|
||||
|
||||
at Object.<anonymous>.test (__tests__/DEFAULT_TIMEOUT_INTERVAL.test.js:10:3)
|
||||
at Object.<anonymous>.test (__tests__/defaultTimeoutInterval.test.js:10:3)
|
||||
|
||||
"
|
||||
`;
|
|
@ -1,7 +1,7 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`not throwing Error objects 1`] = `
|
||||
"FAIL __tests__/throw_number.test.js
|
||||
"FAIL __tests__/throwNumber.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Expected an Error, but \\"1\\" was thrown
|
||||
|
@ -10,7 +10,7 @@ exports[`not throwing Error objects 1`] = `
|
|||
`;
|
||||
|
||||
exports[`not throwing Error objects 2`] = `
|
||||
"FAIL __tests__/throw_string.test.js
|
||||
"FAIL __tests__/throwString.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
banana
|
||||
|
@ -19,7 +19,7 @@ exports[`not throwing Error objects 2`] = `
|
|||
`;
|
||||
|
||||
exports[`not throwing Error objects 3`] = `
|
||||
"FAIL __tests__/throw_object.test.js
|
||||
"FAIL __tests__/throwObject.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Error: No message was provided
|
||||
|
@ -28,7 +28,7 @@ exports[`not throwing Error objects 3`] = `
|
|||
`;
|
||||
|
||||
exports[`not throwing Error objects 4`] = `
|
||||
"FAIL __tests__/assertion_count.test.js
|
||||
"FAIL __tests__/assertionCount.test.js
|
||||
.assertions()
|
||||
✕ throws
|
||||
✕ throws on redeclare of assertion count
|
||||
|
@ -50,7 +50,7 @@ exports[`not throwing Error objects 4`] = `
|
|||
15 | const redeclare = () => {
|
||||
16 | expect.assertions(1);
|
||||
|
||||
at Object.toBeTruthy (__tests__/assertion_count.test.js:13:17)
|
||||
at Object.toBeTruthy (__tests__/assertionCount.test.js:13:17)
|
||||
|
||||
● .assertions() › throws
|
||||
|
||||
|
@ -66,7 +66,7 @@ exports[`not throwing Error objects 4`] = `
|
|||
14 | };
|
||||
15 | const redeclare = () => {
|
||||
|
||||
at Object.assertions (__tests__/assertion_count.test.js:12:10)
|
||||
at Object.assertions (__tests__/assertionCount.test.js:12:10)
|
||||
|
||||
● .assertions() › throws on redeclare of assertion count
|
||||
|
||||
|
@ -82,7 +82,7 @@ exports[`not throwing Error objects 4`] = `
|
|||
19 | };
|
||||
20 |
|
||||
|
||||
at Object.toBeTruthy (__tests__/assertion_count.test.js:17:17)
|
||||
at Object.toBeTruthy (__tests__/assertionCount.test.js:17:17)
|
||||
|
||||
● .assertions() › throws on assertion
|
||||
|
||||
|
@ -98,7 +98,7 @@ exports[`not throwing Error objects 4`] = `
|
|||
24 | };
|
||||
25 |
|
||||
|
||||
at Object.assertions (__tests__/assertion_count.test.js:22:10)
|
||||
at Object.assertions (__tests__/assertionCount.test.js:22:10)
|
||||
|
||||
● .hasAssertions() › throws when there are not assertions
|
||||
|
||||
|
@ -114,13 +114,13 @@ exports[`not throwing Error objects 4`] = `
|
|||
29 |
|
||||
30 | describe('.assertions()', () => {
|
||||
|
||||
at Object.hasAssertions (__tests__/assertion_count.test.js:27:10)
|
||||
at Object.hasAssertions (__tests__/assertionCount.test.js:27:10)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`not throwing Error objects 5`] = `
|
||||
"FAIL __tests__/during_tests.test.js
|
||||
"FAIL __tests__/duringTests.test.js
|
||||
✕ Promise thrown during test
|
||||
✕ Boolean thrown during test
|
||||
✕ undefined thrown during test
|
||||
|
@ -142,7 +142,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
11 | });
|
||||
12 |
|
||||
|
||||
at Object.test (__tests__/during_tests.test.js:9:1)
|
||||
at Object.test (__tests__/duringTests.test.js:9:1)
|
||||
|
||||
● Boolean thrown during test
|
||||
|
||||
|
@ -156,7 +156,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
15 | throw false;
|
||||
16 | });
|
||||
|
||||
at Object.test (__tests__/during_tests.test.js:13:1)
|
||||
at Object.test (__tests__/duringTests.test.js:13:1)
|
||||
|
||||
● undefined thrown during test
|
||||
|
||||
|
@ -170,7 +170,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
20 | throw undefined;
|
||||
21 | });
|
||||
|
||||
at Object.test (__tests__/during_tests.test.js:18:1)
|
||||
at Object.test (__tests__/duringTests.test.js:18:1)
|
||||
|
||||
● Object thrown during test
|
||||
|
||||
|
@ -191,7 +191,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
25 | throw deepObject;
|
||||
26 | });
|
||||
|
||||
at Object.test (__tests__/during_tests.test.js:23:1)
|
||||
at Object.test (__tests__/duringTests.test.js:23:1)
|
||||
|
||||
● Error during test
|
||||
|
||||
|
@ -205,7 +205,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
32 |
|
||||
33 | test('done(Error)', done => {
|
||||
|
||||
at Object.doesNotExist (__tests__/during_tests.test.js:30:3)
|
||||
at Object.doesNotExist (__tests__/duringTests.test.js:30:3)
|
||||
|
||||
● done(Error)
|
||||
|
||||
|
@ -219,7 +219,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
36 |
|
||||
37 | test('done(non-error)', done => {
|
||||
|
||||
at Object.<anonymous>.done (__tests__/during_tests.test.js:34:8)
|
||||
at Object.<anonymous>.done (__tests__/duringTests.test.js:34:8)
|
||||
|
||||
● done(non-error)
|
||||
|
||||
|
@ -240,7 +240,7 @@ exports[`not throwing Error objects 5`] = `
|
|||
40 |
|
||||
41 | test('returned promise rejection', () => Promise.reject(deepObject));
|
||||
|
||||
at Object.done (__tests__/during_tests.test.js:38:3)
|
||||
at Object.done (__tests__/duringTests.test.js:38:3)
|
||||
|
||||
● returned promise rejection
|
||||
|
||||
|
@ -259,13 +259,13 @@ exports[`not throwing Error objects 5`] = `
|
|||
| ^
|
||||
42 |
|
||||
|
||||
at Object.test (__tests__/during_tests.test.js:41:1)
|
||||
at Object.test (__tests__/duringTests.test.js:41:1)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`works with assertions in separate files 1`] = `
|
||||
"FAIL __tests__/test_macro.test.js
|
||||
"FAIL __tests__/testMacro.test.js
|
||||
✕ use some imported macro to make assertion
|
||||
|
||||
● use some imported macro to make assertion
|
||||
|
@ -283,13 +283,13 @@ exports[`works with assertions in separate files 1`] = `
|
|||
14 |
|
||||
|
||||
at toEqual (macros.js:12:15)
|
||||
at Object.shouldEqual (__tests__/test_macro.test.js:14:3)
|
||||
at Object.shouldEqual (__tests__/testMacro.test.js:14:3)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`works with async failures 1`] = `
|
||||
"FAIL __tests__/async_failures.test.js
|
||||
"FAIL __tests__/asyncFailures.test.js
|
||||
✕ resolve, but fail
|
||||
✕ reject, but fail
|
||||
✕ expect reject
|
||||
|
@ -318,7 +318,7 @@ exports[`works with async failures 1`] = `
|
|||
14 | test('reject, but fail', () =>
|
||||
15 | expect(Promise.reject({foo: 'bar'})).rejects.toEqual({baz: 'bar'}));
|
||||
|
||||
at Object.toEqual (__tests__/async_failures.test.js:12:50)
|
||||
at Object.toEqual (__tests__/asyncFailures.test.js:12:50)
|
||||
|
||||
● reject, but fail
|
||||
|
||||
|
@ -342,7 +342,7 @@ exports[`works with async failures 1`] = `
|
|||
17 | test('expect reject', () =>
|
||||
18 | expect(Promise.resolve({foo: 'bar'})).rejects.toEqual({foo: 'bar'}));
|
||||
|
||||
at Object.toEqual (__tests__/async_failures.test.js:15:48)
|
||||
at Object.toEqual (__tests__/asyncFailures.test.js:15:48)
|
||||
|
||||
● expect reject
|
||||
|
||||
|
@ -359,7 +359,7 @@ exports[`works with async failures 1`] = `
|
|||
20 | test('expect resolve', () =>
|
||||
21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'}));
|
||||
|
||||
at Object.expect (__tests__/async_failures.test.js:18:3)
|
||||
at Object.expect (__tests__/asyncFailures.test.js:18:3)
|
||||
|
||||
● expect resolve
|
||||
|
||||
|
@ -376,7 +376,7 @@ exports[`works with async failures 1`] = `
|
|||
23 | test('timeout', done => {
|
||||
24 | setTimeout(done, 50);
|
||||
|
||||
at Object.expect (__tests__/async_failures.test.js:21:3)
|
||||
at Object.expect (__tests__/asyncFailures.test.js:21:3)
|
||||
|
||||
● timeout
|
||||
|
||||
|
@ -390,13 +390,13 @@ exports[`works with async failures 1`] = `
|
|||
25 | }, 5);
|
||||
26 |
|
||||
|
||||
at Object.test (__tests__/async_failures.test.js:23:1)
|
||||
at Object.test (__tests__/asyncFailures.test.js:23:1)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`works with named snapshot failures 1`] = `
|
||||
"FAIL __tests__/snapshot_named.test.js
|
||||
"FAIL __tests__/snapshotNamed.test.js
|
||||
✕ failing named snapshot
|
||||
|
||||
● failing named snapshot
|
||||
|
@ -418,14 +418,14 @@ exports[`works with named snapshot failures 1`] = `
|
|||
13 | });
|
||||
14 |
|
||||
|
||||
at Object.toMatchSnapshot (__tests__/snapshot_named.test.js:12:17)
|
||||
at Object.toMatchSnapshot (__tests__/snapshotNamed.test.js:12:17)
|
||||
|
||||
› 1 snapshot failed.
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`works with node assert 1`] = `
|
||||
"FAIL __tests__/node_assertion_error.test.js
|
||||
"FAIL __tests__/assertionError.test.js
|
||||
✕ assert
|
||||
✕ assert with a message
|
||||
✕ assert.ok
|
||||
|
@ -461,7 +461,7 @@ exports[`works with node assert 1`] = `
|
|||
17 |
|
||||
18 | test('assert with a message', () => {
|
||||
|
||||
at Object.assert (__tests__/node_assertion_error.test.js:15:3)
|
||||
at Object.assert (__tests__/assertionError.test.js:15:3)
|
||||
|
||||
● assert with a message
|
||||
|
||||
|
@ -483,7 +483,7 @@ exports[`works with node assert 1`] = `
|
|||
21 |
|
||||
22 | test('assert.ok', () => {
|
||||
|
||||
at Object.assert (__tests__/node_assertion_error.test.js:19:3)
|
||||
at Object.assert (__tests__/assertionError.test.js:19:3)
|
||||
|
||||
● assert.ok
|
||||
|
||||
|
@ -502,7 +502,7 @@ exports[`works with node assert 1`] = `
|
|||
25 |
|
||||
26 | test('assert.ok with a message', () => {
|
||||
|
||||
at Object.ok (__tests__/node_assertion_error.test.js:23:10)
|
||||
at Object.ok (__tests__/assertionError.test.js:23:10)
|
||||
|
||||
● assert.ok with a message
|
||||
|
||||
|
@ -524,7 +524,7 @@ exports[`works with node assert 1`] = `
|
|||
29 |
|
||||
30 | test('assert.equal', () => {
|
||||
|
||||
at Object.ok (__tests__/node_assertion_error.test.js:27:10)
|
||||
at Object.ok (__tests__/assertionError.test.js:27:10)
|
||||
|
||||
● assert.equal
|
||||
|
||||
|
@ -543,7 +543,7 @@ exports[`works with node assert 1`] = `
|
|||
33 |
|
||||
34 | test('assert.notEqual', () => {
|
||||
|
||||
at Object.equal (__tests__/node_assertion_error.test.js:31:10)
|
||||
at Object.equal (__tests__/assertionError.test.js:31:10)
|
||||
|
||||
● assert.notEqual
|
||||
|
||||
|
@ -566,7 +566,7 @@ exports[`works with node assert 1`] = `
|
|||
37 |
|
||||
38 | test('assert.deepEqual', () => {
|
||||
|
||||
at Object.notEqual (__tests__/node_assertion_error.test.js:35:10)
|
||||
at Object.notEqual (__tests__/assertionError.test.js:35:10)
|
||||
|
||||
● assert.deepEqual
|
||||
|
||||
|
@ -599,7 +599,7 @@ exports[`works with node assert 1`] = `
|
|||
41 |
|
||||
42 | test('assert.deepEqual with a message', () => {
|
||||
|
||||
at Object.deepEqual (__tests__/node_assertion_error.test.js:39:10)
|
||||
at Object.deepEqual (__tests__/assertionError.test.js:39:10)
|
||||
|
||||
● assert.deepEqual with a message
|
||||
|
||||
|
@ -635,7 +635,7 @@ exports[`works with node assert 1`] = `
|
|||
45 |
|
||||
46 | test('assert.notDeepEqual', () => {
|
||||
|
||||
at Object.deepEqual (__tests__/node_assertion_error.test.js:43:10)
|
||||
at Object.deepEqual (__tests__/assertionError.test.js:43:10)
|
||||
|
||||
● assert.notDeepEqual
|
||||
|
||||
|
@ -658,7 +658,7 @@ exports[`works with node assert 1`] = `
|
|||
49 |
|
||||
50 | test('assert.strictEqual', () => {
|
||||
|
||||
at Object.notDeepEqual (__tests__/node_assertion_error.test.js:47:10)
|
||||
at Object.notDeepEqual (__tests__/assertionError.test.js:47:10)
|
||||
|
||||
● assert.strictEqual
|
||||
|
||||
|
@ -677,7 +677,7 @@ exports[`works with node assert 1`] = `
|
|||
53 |
|
||||
54 | test('assert.notStrictEqual', () => {
|
||||
|
||||
at Object.strictEqual (__tests__/node_assertion_error.test.js:51:10)
|
||||
at Object.strictEqual (__tests__/assertionError.test.js:51:10)
|
||||
|
||||
● assert.notStrictEqual
|
||||
|
||||
|
@ -703,7 +703,7 @@ exports[`works with node assert 1`] = `
|
|||
57 |
|
||||
58 | test('assert.deepStrictEqual', () => {
|
||||
|
||||
at Object.notStrictEqual (__tests__/node_assertion_error.test.js:55:10)
|
||||
at Object.notStrictEqual (__tests__/assertionError.test.js:55:10)
|
||||
|
||||
● assert.deepStrictEqual
|
||||
|
||||
|
@ -732,7 +732,7 @@ exports[`works with node assert 1`] = `
|
|||
61 |
|
||||
62 | test('assert.notDeepStrictEqual', () => {
|
||||
|
||||
at Object.deepStrictEqual (__tests__/node_assertion_error.test.js:59:10)
|
||||
at Object.deepStrictEqual (__tests__/assertionError.test.js:59:10)
|
||||
|
||||
● assert.notDeepStrictEqual
|
||||
|
||||
|
@ -755,7 +755,7 @@ exports[`works with node assert 1`] = `
|
|||
65 |
|
||||
66 | test('assert.ifError', () => {
|
||||
|
||||
at Object.notDeepStrictEqual (__tests__/node_assertion_error.test.js:63:10)
|
||||
at Object.notDeepStrictEqual (__tests__/assertionError.test.js:63:10)
|
||||
|
||||
● assert.ifError
|
||||
|
||||
|
@ -778,7 +778,7 @@ exports[`works with node assert 1`] = `
|
|||
73 | });
|
||||
74 | });
|
||||
|
||||
at Object.doesNotThrow (__tests__/node_assertion_error.test.js:71:10)
|
||||
at Object.doesNotThrow (__tests__/assertionError.test.js:71:10)
|
||||
|
||||
● assert.throws
|
||||
|
||||
|
@ -798,7 +798,7 @@ exports[`works with node assert 1`] = `
|
|||
79 |
|
||||
80 | test('async', async () => {
|
||||
|
||||
at Object.throws (__tests__/node_assertion_error.test.js:77:10)
|
||||
at Object.throws (__tests__/assertionError.test.js:77:10)
|
||||
|
||||
● async
|
||||
|
||||
|
@ -828,11 +828,11 @@ exports[`works with node assert 1`] = `
|
|||
82 | });
|
||||
83 |
|
||||
|
||||
at Object.equal (__tests__/node_assertion_error.test.js:81:10)
|
||||
at asyncGeneratorStep (__tests__/node_assertion_error.test.js:11:103)
|
||||
at _next (__tests__/node_assertion_error.test.js:13:194)
|
||||
at __tests__/node_assertion_error.test.js:13:364
|
||||
at Object.<anonymous> (__tests__/node_assertion_error.test.js:13:97)
|
||||
at Object.equal (__tests__/assertionError.test.js:81:10)
|
||||
at asyncGeneratorStep (__tests__/assertionError.test.js:11:103)
|
||||
at _next (__tests__/assertionError.test.js:13:194)
|
||||
at __tests__/assertionError.test.js:13:364
|
||||
at Object.<anonymous> (__tests__/assertionError.test.js:13:97)
|
||||
|
||||
"
|
||||
`;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`basic test constructs 1`] = `
|
||||
"PASS __tests__/basic.test-constructs.test.js
|
||||
"PASS __tests__/basic.testConstructs.test.js
|
||||
✓ it
|
||||
✓ test
|
||||
describe
|
||||
|
@ -20,7 +20,7 @@ Ran all test suites."
|
|||
`;
|
||||
|
||||
exports[`cannot have describe with no implementation 1`] = `
|
||||
"FAIL __tests__/only-constructs.test.js
|
||||
"FAIL __tests__/onlyConstructs.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Missing second argument. It must be a callback function.
|
||||
|
@ -30,7 +30,7 @@ exports[`cannot have describe with no implementation 1`] = `
|
|||
| ^
|
||||
3 |
|
||||
|
||||
at Object.<anonymous> (__tests__/only-constructs.test.js:2:14)
|
||||
at Object.<anonymous> (__tests__/onlyConstructs.test.js:2:14)
|
||||
|
||||
"
|
||||
`;
|
||||
|
@ -45,7 +45,7 @@ Ran all test suites.
|
|||
`;
|
||||
|
||||
exports[`cannot test with no implementation 1`] = `
|
||||
"FAIL __tests__/only-constructs.test.js
|
||||
"FAIL __tests__/onlyConstructs.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Missing second argument. It must be a callback function. Perhaps you want to use \`test.todo\` for a test placeholder.
|
||||
|
@ -57,7 +57,7 @@ exports[`cannot test with no implementation 1`] = `
|
|||
4 | test('test, no implementation');
|
||||
5 |
|
||||
|
||||
at Object.it (__tests__/only-constructs.test.js:3:5)
|
||||
at Object.it (__tests__/onlyConstructs.test.js:3:5)
|
||||
|
||||
"
|
||||
`;
|
||||
|
@ -72,7 +72,7 @@ Ran all test suites.
|
|||
`;
|
||||
|
||||
exports[`cannot test with no implementation with expand arg 1`] = `
|
||||
"FAIL __tests__/only-constructs.test.js
|
||||
"FAIL __tests__/onlyConstructs.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Missing second argument. It must be a callback function. Perhaps you want to use \`test.todo\` for a test placeholder.
|
||||
|
@ -84,7 +84,7 @@ exports[`cannot test with no implementation with expand arg 1`] = `
|
|||
4 | test('test, no implementation');
|
||||
5 |
|
||||
|
||||
at Object.it (__tests__/only-constructs.test.js:3:5)
|
||||
at Object.it (__tests__/onlyConstructs.test.js:3:5)
|
||||
|
||||
"
|
||||
`;
|
||||
|
@ -99,7 +99,7 @@ Ran all test suites.
|
|||
`;
|
||||
|
||||
exports[`function as descriptor 1`] = `
|
||||
"PASS __tests__/function-as-descriptor.test.js
|
||||
"PASS __tests__/functionAsDescriptor.test.js
|
||||
Foo
|
||||
✓ it
|
||||
|
||||
|
@ -115,7 +115,7 @@ Ran all test suites."
|
|||
`;
|
||||
|
||||
exports[`only 1`] = `
|
||||
"PASS __tests__/only-constructs.test.js
|
||||
"PASS __tests__/onlyConstructs.test.js
|
||||
✓ test.only
|
||||
✓ it.only
|
||||
✓ fit
|
||||
|
@ -140,7 +140,7 @@ Ran all test suites."
|
|||
`;
|
||||
|
||||
exports[`only with expand arg 1`] = `
|
||||
"PASS __tests__/only-constructs.test.js
|
||||
"PASS __tests__/onlyConstructs.test.js
|
||||
○ it
|
||||
✓ test.only
|
||||
✓ it.only
|
||||
|
@ -165,7 +165,7 @@ Ran all test suites."
|
|||
`;
|
||||
|
||||
exports[`skips 1`] = `
|
||||
"PASS __tests__/skips-constructs.test.js
|
||||
"PASS __tests__/skipsConstructs.test.js
|
||||
✓ it
|
||||
○ skipped 4 tests
|
||||
xdescribe
|
||||
|
@ -187,7 +187,7 @@ Ran all test suites."
|
|||
`;
|
||||
|
||||
exports[`skips with expand arg 1`] = `
|
||||
"PASS __tests__/skips-constructs.test.js
|
||||
"PASS __tests__/skipsConstructs.test.js
|
||||
✓ it
|
||||
○ xtest
|
||||
○ xit
|
||||
|
|
|
@ -110,7 +110,7 @@ exports[`Snapshot works with escaped regex 1`] = `
|
|||
Tests: 2 passed, 2 total
|
||||
Snapshots: 2 written, 2 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /snapshot_escape_regex.js/i."
|
||||
Ran all test suites matching /snapshotEscapeRegex.js/i."
|
||||
`;
|
||||
|
||||
exports[`Snapshot works with escaped regex 2`] = `
|
||||
|
@ -118,7 +118,7 @@ exports[`Snapshot works with escaped regex 2`] = `
|
|||
Tests: 2 passed, 2 total
|
||||
Snapshots: 2 passed, 2 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /snapshot_escape_regex.js/i."
|
||||
Ran all test suites matching /snapshotEscapeRegex.js/i."
|
||||
`;
|
||||
|
||||
exports[`Snapshot works with template literal substitutions 1`] = `
|
||||
|
@ -126,7 +126,7 @@ exports[`Snapshot works with template literal substitutions 1`] = `
|
|||
Tests: 1 passed, 1 total
|
||||
Snapshots: 1 written, 1 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /snapshot_escape_substitution.test.js/i."
|
||||
Ran all test suites matching /snapshotEscapeSubstitution.test.js/i."
|
||||
`;
|
||||
|
||||
exports[`Snapshot works with template literal substitutions 2`] = `
|
||||
|
@ -134,5 +134,5 @@ exports[`Snapshot works with template literal substitutions 2`] = `
|
|||
Tests: 1 passed, 1 total
|
||||
Snapshots: 1 passed, 1 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /snapshot_escape_substitution.test.js/i."
|
||||
Ran all test suites matching /snapshotEscapeSubstitution.test.js/i."
|
||||
`;
|
||||
|
|
|
@ -5,7 +5,7 @@ exports[`Stack Trace does not print a stack trace for errors when --noStackTrace
|
|||
Tests: 3 failed, 3 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /test_error.test.js/i.
|
||||
Ran all test suites matching /testError.test.js/i.
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -14,7 +14,7 @@ exports[`Stack Trace does not print a stack trace for matching errors when --noS
|
|||
Tests: 1 failed, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /stack_trace.test.js/i.
|
||||
Ran all test suites matching /stackTrace.test.js/i.
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -23,7 +23,7 @@ exports[`Stack Trace does not print a stack trace for runtime errors when --noSt
|
|||
Tests: 0 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /runtime_error.test.js/i.
|
||||
Ran all test suites matching /runtimeError.test.js/i.
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -32,7 +32,7 @@ exports[`Stack Trace prints a stack trace for errors 1`] = `
|
|||
Tests: 3 failed, 3 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /test_error.test.js/i.
|
||||
Ran all test suites matching /testError.test.js/i.
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -41,7 +41,7 @@ exports[`Stack Trace prints a stack trace for errors without message in stack tr
|
|||
Tests: 1 failed, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /stack_trace_without_message.test.js/i.
|
||||
Ran all test suites matching /stackTraceWithoutMessage.test.js/i.
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -50,7 +50,7 @@ exports[`Stack Trace prints a stack trace for matching errors 1`] = `
|
|||
Tests: 1 failed, 1 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /stack_trace.test.js/i.
|
||||
Ran all test suites matching /stackTrace.test.js/i.
|
||||
"
|
||||
`;
|
||||
|
||||
|
@ -59,6 +59,6 @@ exports[`Stack Trace prints a stack trace for runtime errors 1`] = `
|
|||
Tests: 0 total
|
||||
Snapshots: 0 total
|
||||
Time: <<REPLACED>>
|
||||
Ran all test suites matching /runtime_error.test.js/i.
|
||||
Ran all test suites matching /runtimeError.test.js/i.
|
||||
"
|
||||
`;
|
|
@ -1,7 +1,7 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`shows error messages when called with invalid argument 1`] = `
|
||||
"FAIL __tests__/todo_non_string.test.js
|
||||
"FAIL __tests__/todoNonString.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Todo must be called with only a description.
|
||||
|
@ -12,13 +12,13 @@ exports[`shows error messages when called with invalid argument 1`] = `
|
|||
| ^
|
||||
9 |
|
||||
|
||||
at Object.todo (__tests__/todo_non_string.test.js:8:4)
|
||||
at Object.todo (__tests__/todoNonString.test.js:8:4)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`shows error messages when called with multiple arguments 1`] = `
|
||||
"FAIL __tests__/todo_multiple_args.test.js
|
||||
"FAIL __tests__/todoMultipleArgs.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Todo must be called with only a description.
|
||||
|
@ -29,13 +29,13 @@ exports[`shows error messages when called with multiple arguments 1`] = `
|
|||
| ^
|
||||
9 |
|
||||
|
||||
at Object.todo (__tests__/todo_multiple_args.test.js:8:4)
|
||||
at Object.todo (__tests__/todoMultipleArgs.test.js:8:4)
|
||||
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`shows error messages when called with no arguments 1`] = `
|
||||
"FAIL __tests__/todo_no_args.test.js
|
||||
"FAIL __tests__/todoNoArgs.test.js
|
||||
● Test suite failed to run
|
||||
|
||||
Todo must be called with only a description.
|
||||
|
@ -46,7 +46,7 @@ exports[`shows error messages when called with no arguments 1`] = `
|
|||
| ^
|
||||
9 |
|
||||
|
||||
at Object.todo (__tests__/todo_no_args.test.js:8:4)
|
||||
at Object.todo (__tests__/todoNoArgs.test.js:8:4)
|
||||
|
||||
"
|
||||
`;
|
|
@ -5,7 +5,7 @@ exports[`babel-jest instruments only specific files and collects coverage 1`] =
|
|||
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|
||||
------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 83.33 | 100 | 50 | 80 | |
|
||||
Covered.js | 83.33 | 100 | 50 | 80 | 13 |
|
||||
covered.js | 83.33 | 100 | 50 | 80 | 13 |
|
||||
------------|----------|----------|----------|----------|-------------------|"
|
||||
`;
|
||||
|
||||
|
@ -22,7 +22,7 @@ exports[`no babel-jest instrumentation with no babel-jest 1`] = `
|
|||
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|
||||
------------|----------|----------|----------|----------|-------------------|
|
||||
All files | 83.33 | 100 | 50 | 80 | |
|
||||
Covered.js | 83.33 | 100 | 50 | 80 | 13 |
|
||||
covered.js | 83.33 | 100 | 50 | 80 | 13 |
|
||||
------------|----------|----------|----------|----------|-------------------|
|
||||
"
|
||||
`;
|
||||
|
|
|
@ -13,5 +13,5 @@ import runJest from '../runJest';
|
|||
test('does not crash when expect involving a DOM node fails', () => {
|
||||
const result = runJest('compare-dom-nodes');
|
||||
|
||||
expect(result.stderr).toContain('FAIL __tests__/failed-assertion.js');
|
||||
expect(result.stderr).toContain('FAIL __tests__/failedAssertion.js');
|
||||
});
|
|
@ -13,7 +13,7 @@ import path from 'path';
|
|||
import {cleanup, extractSummary, writeFiles} from '../Utils';
|
||||
import runJest from '../runJest';
|
||||
|
||||
const DIR = path.resolve(__dirname, '../console_log_output_when_run_in_band');
|
||||
const DIR = path.resolve(__dirname, '../console-log-output-when-run-in-band');
|
||||
|
||||
beforeEach(() => cleanup(DIR));
|
||||
afterAll(() => cleanup(DIR));
|
|
@ -57,7 +57,7 @@ test('collects coverage only from multiple specified files', () => {
|
|||
'--collectCoverageFrom',
|
||||
'setup.js',
|
||||
'--collectCoverageFrom',
|
||||
'OtherFile.js',
|
||||
'otherFile.js',
|
||||
],
|
||||
{stripAnsi: true},
|
||||
);
|
||||
|
@ -72,9 +72,9 @@ test('collects coverage only from specified files avoiding dependencies', () =>
|
|||
'--no-cache',
|
||||
'--coverage',
|
||||
'--collectCoverageOnlyFrom',
|
||||
'Sum.js',
|
||||
'sum.js',
|
||||
'--',
|
||||
'Sum.test.js',
|
||||
'sum.test.js',
|
||||
],
|
||||
{stripAnsi: true},
|
||||
);
|
||||
|
@ -164,11 +164,11 @@ test('collects coverage from duplicate files avoiding shared cache', () => {
|
|||
'--coverageThreshold',
|
||||
'{"global": {"lines": 100}}',
|
||||
'--collectCoverageOnlyFrom',
|
||||
'cached-duplicates/a/Identical.js',
|
||||
'cached-duplicates/a/identical.js',
|
||||
'--collectCoverageOnlyFrom',
|
||||
'cached-duplicates/b/Identical.js',
|
||||
'cached-duplicates/b/identical.js',
|
||||
'--',
|
||||
'Identical.test.js',
|
||||
'identical.test.js',
|
||||
];
|
||||
// Run once to prime the cache
|
||||
runJest(DIR, args, {stripAnsi: true});
|
|
@ -97,7 +97,7 @@ describe('Custom Reporters Integration', () => {
|
|||
|
||||
test('TestReporter with all tests failing', () => {
|
||||
const {stdout, status, stderr} = runJest('custom-reporters', [
|
||||
'add_fail.test.js',
|
||||
'addFail.test.js',
|
||||
]);
|
||||
|
||||
const parsedJSON = JSON.parse(stdout);
|
|
@ -21,7 +21,7 @@ test('works with passing tests', () => {
|
|||
});
|
||||
|
||||
test('shows error message when not enough arguments are supplied to tests', () => {
|
||||
const result = runJest(dir, ['each-exception.test.js']);
|
||||
const result = runJest(dir, ['eachException.test.js']);
|
||||
expect(result.status).toBe(1);
|
||||
const {rest} = extractSummary(result.stderr);
|
||||
expect(rest).toMatchSnapshot();
|
||||
|
@ -38,21 +38,21 @@ test('shows the correct errors in stderr when failing tests', () => {
|
|||
});
|
||||
|
||||
test('shows only the tests with .only as being ran', () => {
|
||||
const result = runJest(dir, ['each-only.test.js']);
|
||||
const result = runJest(dir, ['eachOnly.test.js']);
|
||||
expect(result.status).toBe(0);
|
||||
const {rest} = extractSummary(result.stderr);
|
||||
expect(rest).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('shows only the tests without .skip as being ran', () => {
|
||||
const result = runJest(dir, ['each-skip.test.js']);
|
||||
const result = runJest(dir, ['eachSkip.test.js']);
|
||||
const {rest} = extractSummary(result.stderr);
|
||||
expect(rest).toMatchSnapshot();
|
||||
expect(result.status).toBe(0);
|
||||
});
|
||||
|
||||
test('runs only the describe.only.each tests', () => {
|
||||
const result = runJest(dir, ['describe-only.test.js']);
|
||||
const result = runJest(dir, ['describeOnly.test.js']);
|
||||
const {rest} = extractSummary(result.stderr);
|
||||
expect(rest).toMatchSnapshot();
|
||||
expect(result.status).toBe(0);
|
||||
|
|
|
@ -19,25 +19,25 @@ const dir = path.resolve(__dirname, '../empty-describe-with-hooks');
|
|||
skipSuiteOnJasmine();
|
||||
|
||||
test('hook in empty describe', () => {
|
||||
const result = runJest(dir, ['hook-in-empty-describe.test.js']);
|
||||
const result = runJest(dir, ['hookInEmptyDescribe.test.js']);
|
||||
expect(result.status).toBe(1);
|
||||
expect(extractSummary(result.stderr)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('hook in describe with skipped test', () => {
|
||||
const result = runJest(dir, ['hook-in-describe-with-skipped-test.test.js']);
|
||||
const result = runJest(dir, ['hookInDescribeWithSkippedTest.test.js']);
|
||||
expect(result.status).toBe(0);
|
||||
expect(extractSummary(result.stderr)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('hook in empty nested describe', () => {
|
||||
const result = runJest(dir, ['hook-in-empty-nested-describe.test.js']);
|
||||
const result = runJest(dir, ['hookInEmptyNestedDescribe.test.js']);
|
||||
expect(result.status).toBe(1);
|
||||
expect(extractSummary(result.stderr)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('multiple hooks in empty describe', () => {
|
||||
const result = runJest(dir, ['multiple-hooks-in-empty-describe.test.js']);
|
||||
const result = runJest(dir, ['multipleHooksInEmptyDescribe.test.js']);
|
||||
expect(result.status).toBe(1);
|
||||
expect(extractSummary(result.stderr)).toMatchSnapshot();
|
||||
});
|
|
@ -26,7 +26,7 @@ const testFiles = [
|
|||
'pending.test.js',
|
||||
'spyOn.test.js',
|
||||
'spyOnProperty.test.js',
|
||||
'DEFAULT_TIMEOUT_INTERVAL.test.js',
|
||||
'defaultTimeoutInterval.test.js',
|
||||
];
|
||||
|
||||
const SHOULD_NOT_PASS_IN_JEST = new Set([
|
|
@ -24,21 +24,21 @@ function cleanStderr(stderr) {
|
|||
|
||||
test('not throwing Error objects', () => {
|
||||
let stderr;
|
||||
stderr = runJest(dir, ['throw_number.test.js']).stderr;
|
||||
stderr = runJest(dir, ['throwNumber.test.js']).stderr;
|
||||
expect(cleanStderr(stderr)).toMatchSnapshot();
|
||||
stderr = runJest(dir, ['throw_string.test.js']).stderr;
|
||||
stderr = runJest(dir, ['throwString.test.js']).stderr;
|
||||
expect(cleanStderr(stderr)).toMatchSnapshot();
|
||||
stderr = runJest(dir, ['throw_object.test.js']).stderr;
|
||||
stderr = runJest(dir, ['throwObject.test.js']).stderr;
|
||||
expect(cleanStderr(stderr)).toMatchSnapshot();
|
||||
stderr = runJest(dir, ['assertion_count.test.js']).stderr;
|
||||
stderr = runJest(dir, ['assertionCount.test.js']).stderr;
|
||||
expect(cleanStderr(stderr)).toMatchSnapshot();
|
||||
stderr = runJest(dir, ['during_tests.test.js']).stderr;
|
||||
stderr = runJest(dir, ['duringTests.test.js']).stderr;
|
||||
expect(cleanStderr(stderr)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('works with node assert', () => {
|
||||
const nodeMajorVersion = Number(process.versions.node.split('.')[0]);
|
||||
const {stderr} = runJest(dir, ['node_assertion_error.test.js']);
|
||||
const {stderr} = runJest(dir, ['assertionError.test.js']);
|
||||
let summary = normalizeDots(cleanStderr(stderr));
|
||||
|
||||
// Node 9 started to include the error for `doesNotThrow`
|
||||
|
@ -64,7 +64,7 @@ test('works with node assert', () => {
|
|||
73 | });
|
||||
74 | });
|
||||
|
||||
at Object.doesNotThrow (__tests__/node_assertion_error.test.js:71:10)
|
||||
at Object.doesNotThrow (__tests__/assertionError.test.js:71:10)
|
||||
`);
|
||||
|
||||
const commonErrorMessage = `Message:
|
||||
|
@ -114,7 +114,7 @@ test('works with node assert', () => {
|
|||
69 |
|
||||
70 | test('assert.doesNotThrow', () => {
|
||||
|
||||
at Object.ifError (__tests__/node_assertion_error.test.js:67:10)
|
||||
at Object.ifError (__tests__/assertionError.test.js:67:10)
|
||||
`;
|
||||
|
||||
expect(summary).toContain(ifErrorMessage);
|
||||
|
@ -131,7 +131,7 @@ test('works with node assert', () => {
|
|||
68 | });
|
||||
69 |
|
||||
|
||||
at Object.test (__tests__/node_assertion_error.test.js:66:1)
|
||||
at Object.test (__tests__/assertionError.test.js:66:1)
|
||||
`;
|
||||
|
||||
expect(summary).toContain(ifErrorMessage);
|
||||
|
@ -142,13 +142,13 @@ test('works with node assert', () => {
|
|||
});
|
||||
|
||||
test('works with assertions in separate files', () => {
|
||||
const {stderr} = runJest(dir, ['test_macro.test.js']);
|
||||
const {stderr} = runJest(dir, ['testMacro.test.js']);
|
||||
|
||||
expect(normalizeDots(cleanStderr(stderr))).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('works with async failures', () => {
|
||||
const {stderr} = runJest(dir, ['async_failures.test.js']);
|
||||
const {stderr} = runJest(dir, ['asyncFailures.test.js']);
|
||||
|
||||
const rest = cleanStderr(stderr)
|
||||
.split('\n')
|
||||
|
@ -175,7 +175,7 @@ test('works with snapshot failures', () => {
|
|||
});
|
||||
|
||||
test('works with named snapshot failures', () => {
|
||||
const {stderr} = runJest(dir, ['snapshot_named.test.js']);
|
||||
const {stderr} = runJest(dir, ['snapshotNamed.test.js']);
|
||||
|
||||
const result = normalizeDots(cleanStderr(stderr));
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import os from 'os';
|
|||
import path from 'path';
|
||||
import {cleanup, extractSummary, writeFiles} from '../Utils';
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'find_related_tests_test');
|
||||
const DIR = path.resolve(os.tmpdir(), 'find-related-tests-test');
|
||||
|
||||
beforeEach(() => cleanup(DIR));
|
||||
afterEach(() => cleanup(DIR));
|
|
@ -14,7 +14,7 @@ import os from 'os';
|
|||
import path from 'path';
|
||||
import {cleanup, writeFiles} from '../Utils';
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'force_exit_test');
|
||||
const DIR = path.resolve(os.tmpdir(), 'force-exit-test');
|
||||
|
||||
beforeEach(() => cleanup(DIR));
|
||||
afterEach(() => cleanup(DIR));
|
|
@ -43,7 +43,7 @@ test('globalSetup is triggered once before all test suites', () => {
|
|||
});
|
||||
|
||||
test('jest throws an error when globalSetup does not export a function', () => {
|
||||
const setupPath = path.resolve(__dirname, '../global-setup/invalid_setup.js');
|
||||
const setupPath = path.resolve(__dirname, '../global-setup/invalidSetup.js');
|
||||
const {status, stderr} = runJest('global-setup', [
|
||||
`--globalSetup=${setupPath}`,
|
||||
`--testPathPattern=__tests__`,
|
||||
|
@ -58,7 +58,7 @@ test('jest throws an error when globalSetup does not export a function', () => {
|
|||
test('globalSetup function gets jest config object as a parameter', () => {
|
||||
const setupPath = path.resolve(
|
||||
__dirname,
|
||||
'../global-setup/setup-with-config.js',
|
||||
'../global-setup/setupWithConfig.js',
|
||||
);
|
||||
|
||||
const testPathPattern = 'pass';
|
|
@ -50,7 +50,7 @@ test('globalTeardown is triggered once after all test suites', () => {
|
|||
test('jest throws an error when globalTeardown does not export a function', () => {
|
||||
const teardownPath = path.resolve(
|
||||
__dirname,
|
||||
'../global-teardown/invalid_teardown.js',
|
||||
'../global-teardown/invalidTeardown.js',
|
||||
);
|
||||
const {status, stderr} = runJest('global-teardown', [
|
||||
`--globalTeardown=${teardownPath}`,
|
||||
|
@ -66,7 +66,7 @@ test('jest throws an error when globalTeardown does not export a function', () =
|
|||
test('globalTeardown function gets jest config object as a parameter', () => {
|
||||
const teardownPath = path.resolve(
|
||||
__dirname,
|
||||
'../global-teardown/teardown-with-config.js',
|
||||
'../global-teardown/teardownWithConfig.js',
|
||||
);
|
||||
|
||||
const testPathPattern = 'pass';
|
|
@ -19,7 +19,7 @@ import {
|
|||
writeFiles,
|
||||
} from '../Utils';
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'global-variables.test');
|
||||
const DIR = path.resolve(os.tmpdir(), 'globalVariables.test');
|
||||
const TEST_DIR = path.resolve(DIR, '__tests__');
|
||||
|
||||
function cleanStderr(stderr) {
|
||||
|
@ -35,7 +35,7 @@ beforeEach(() => {
|
|||
afterAll(() => cleanup(DIR));
|
||||
|
||||
test('basic test constructs', () => {
|
||||
const filename = 'basic.test-constructs.test.js';
|
||||
const filename = 'basic.testConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
test('test', () => {});
|
||||
|
@ -56,7 +56,7 @@ test('basic test constructs', () => {
|
|||
});
|
||||
|
||||
test('skips', () => {
|
||||
const filename = 'skips-constructs.test.js';
|
||||
const filename = 'skipsConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
xtest('xtest', () => {});
|
||||
|
@ -87,7 +87,7 @@ test('skips', () => {
|
|||
});
|
||||
|
||||
test('only', () => {
|
||||
const filename = 'only-constructs.test.js';
|
||||
const filename = 'onlyConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
test.only('test.only', () => {});
|
||||
|
@ -117,7 +117,7 @@ test('only', () => {
|
|||
});
|
||||
|
||||
test('cannot have describe with no implementation', () => {
|
||||
const filename = 'only-constructs.test.js';
|
||||
const filename = 'onlyConstructs.test.js';
|
||||
const content = `
|
||||
describe('describe, no implementation');
|
||||
`;
|
||||
|
@ -133,7 +133,7 @@ test('cannot have describe with no implementation', () => {
|
|||
});
|
||||
|
||||
test('cannot test with no implementation', () => {
|
||||
const filename = 'only-constructs.test.js';
|
||||
const filename = 'onlyConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
it('it, no implementation');
|
||||
|
@ -150,7 +150,7 @@ test('cannot test with no implementation', () => {
|
|||
});
|
||||
|
||||
test('skips with expand arg', () => {
|
||||
const filename = 'skips-constructs.test.js';
|
||||
const filename = 'skipsConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
xtest('xtest', () => {});
|
||||
|
@ -181,7 +181,7 @@ test('skips with expand arg', () => {
|
|||
});
|
||||
|
||||
test('only with expand arg', () => {
|
||||
const filename = 'only-constructs.test.js';
|
||||
const filename = 'onlyConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
test.only('test.only', () => {});
|
||||
|
@ -211,7 +211,7 @@ test('only with expand arg', () => {
|
|||
});
|
||||
|
||||
test('cannot test with no implementation with expand arg', () => {
|
||||
const filename = 'only-constructs.test.js';
|
||||
const filename = 'onlyConstructs.test.js';
|
||||
const content = `
|
||||
it('it', () => {});
|
||||
it('it, no implementation');
|
||||
|
@ -228,7 +228,7 @@ test('cannot test with no implementation with expand arg', () => {
|
|||
});
|
||||
|
||||
test('function as descriptor', () => {
|
||||
const filename = 'function-as-descriptor.test.js';
|
||||
const filename = 'functionAsDescriptor.test.js';
|
||||
const content = `
|
||||
function Foo() {}
|
||||
describe(Foo, () => {
|
||||
|
|
|
@ -24,8 +24,8 @@ test('exits the process after test are done but before timers complete', async (
|
|||
'file.android.js': '"foo android"',
|
||||
'file.ios.js': '"foo ios"',
|
||||
'file.js': '"foo default"',
|
||||
'file_with_extension.ignored': '"ignored file"',
|
||||
'node_modules/bar/file_with_extension.ignored': '"ignored node modules"',
|
||||
'fileWithExtension.ignored': '"ignored file"',
|
||||
'node_modules/bar/fileWithExtension.ignored': '"ignored node modules"',
|
||||
'node_modules/bar/image.png': '"an image"',
|
||||
'node_modules/bar/index.js': '"node modules bar"',
|
||||
});
|
||||
|
@ -70,13 +70,13 @@ test('exits the process after test are done but before timers complete', async (
|
|||
|
||||
// Ignored files do not get the SHA-1 computed.
|
||||
|
||||
expect(hasteFS.getSha1(path.join(DIR, 'file_with_extension.ignored'))).toBe(
|
||||
expect(hasteFS.getSha1(path.join(DIR, 'fileWithExtension.ignored'))).toBe(
|
||||
null,
|
||||
);
|
||||
|
||||
expect(
|
||||
hasteFS.getSha1(
|
||||
path.join(DIR, 'node_modules/bar/file_with_extension.ignored'),
|
||||
path.join(DIR, 'node_modules/bar/fileWithExtension.ignored'),
|
||||
),
|
||||
).toBe(null);
|
||||
});
|
|
@ -13,7 +13,7 @@ import runJest, {json as runWithJson} from '../runJest';
|
|||
|
||||
describe('async jasmine', () => {
|
||||
it('works with beforeAll', () => {
|
||||
const result = runWithJson('jasmine-async', ['promise_before_all.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['promiseBeforeAll.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(4);
|
||||
|
@ -29,9 +29,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('works with beforeEach', () => {
|
||||
const result = runWithJson('jasmine-async', [
|
||||
'promise_before_each.test.js',
|
||||
]);
|
||||
const result = runWithJson('jasmine-async', ['promiseBeforeEach.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(3);
|
||||
|
@ -45,7 +43,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('works with afterAll', () => {
|
||||
const result = runWithJson('jasmine-async', ['promise_after_all.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['promiseAfterAll.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(2);
|
||||
|
@ -58,7 +56,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('works with afterEach', () => {
|
||||
const result = runWithJson('jasmine-async', ['promise_after_each.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['promiseAfterEach.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(2);
|
||||
|
@ -69,7 +67,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('works with fit', () => {
|
||||
const result = runWithJson('jasmine-async', ['promise_fit.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['promiseFit.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(3);
|
||||
|
@ -80,7 +78,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('works with xit', () => {
|
||||
const result = runWithJson('jasmine-async', ['promise_xit.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['promiseXit.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(2);
|
||||
|
@ -90,7 +88,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('throws when not a promise is returned', () => {
|
||||
const result = runWithJson('jasmine-async', ['returning_values.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['returningValues.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(11);
|
||||
|
@ -100,7 +98,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('tests async promise code', () => {
|
||||
const result = runWithJson('jasmine-async', ['promise_it.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['promiseIt.test.js']);
|
||||
const json = result.json;
|
||||
const message = json.testResults[0].message;
|
||||
|
||||
|
@ -130,7 +128,7 @@ describe('async jasmine', () => {
|
|||
});
|
||||
|
||||
it('async test fails', () => {
|
||||
const result = runWithJson('jasmine-async', ['async_test_fails.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['asyncTestFails.test.js']);
|
||||
|
||||
expect(result.status).toBe(1);
|
||||
expect(result.json.testResults[0].message).toEqual(
|
|
@ -16,7 +16,7 @@ describe('async jasmine with pending during test', () => {
|
|||
skipSuiteOnJestCircus();
|
||||
|
||||
it('should be reported as a pending test', () => {
|
||||
const result = runWithJson('jasmine-async', ['pending_in_promise.test.js']);
|
||||
const result = runWithJson('jasmine-async', ['pendingInPromise.test.js']);
|
||||
const json = result.json;
|
||||
|
||||
expect(json.numTotalTests).toBe(1);
|
|
@ -21,7 +21,7 @@ import runJest from '../runJest';
|
|||
|
||||
skipSuiteOnWindows();
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'jest_changed_files_test_dir');
|
||||
const DIR = path.resolve(os.tmpdir(), 'jest-changed-files-test-dir');
|
||||
|
||||
const GIT = 'git -c user.name=jest_test -c user.email=jest_test@test.com';
|
||||
const HG = 'hg --config ui.username=jest_test';
|
||||
|
@ -31,23 +31,23 @@ afterEach(() => cleanup(DIR));
|
|||
|
||||
test('gets hg SCM roots and dedups them', async () => {
|
||||
writeFiles(DIR, {
|
||||
'first_repo/file1.txt': 'file1',
|
||||
'first_repo/nested_dir/file2.txt': 'file2',
|
||||
'first_repo/nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'second_repo/file1.txt': 'file1',
|
||||
'second_repo/nested_dir/file2.txt': 'file2',
|
||||
'second_repo/nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'first-repo/file1.txt': 'file1',
|
||||
'first-repo/nested-dir/file2.txt': 'file2',
|
||||
'first-repo/nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
'second-repo/file1.txt': 'file1',
|
||||
'second-repo/nested-dir/file2.txt': 'file2',
|
||||
'second-repo/nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${HG} init`, path.resolve(DIR, 'first_repo'));
|
||||
run(`${HG} init`, path.resolve(DIR, 'second_repo'));
|
||||
run(`${HG} init`, path.resolve(DIR, 'first-repo'));
|
||||
run(`${HG} init`, path.resolve(DIR, 'second-repo'));
|
||||
|
||||
const roots = [
|
||||
'',
|
||||
'first_repo/nested_dir',
|
||||
'first_repo/nested_dir/second_nested_dir',
|
||||
'second_repo/nested_dir',
|
||||
'second_repo/nested_dir/second_nested_dir',
|
||||
'first-repo/nested-dir',
|
||||
'first-repo/nested-dir/second-nested-dir',
|
||||
'second-repo/nested-dir',
|
||||
'second-repo/nested-dir/second-nested-dir',
|
||||
].map(filename => path.resolve(DIR, filename));
|
||||
|
||||
const repos = await findRepos(roots);
|
||||
|
@ -60,29 +60,29 @@ test('gets hg SCM roots and dedups them', async () => {
|
|||
// NOTE: This test can break if you have a .hg repo initialized inside your
|
||||
// os tmp directory.
|
||||
expect(hgRepos).toHaveLength(2);
|
||||
expect(hgRepos[0]).toMatch(/\/jest_changed_files_test_dir\/first_repo$/);
|
||||
expect(hgRepos[1]).toMatch(/\/jest_changed_files_test_dir\/second_repo$/);
|
||||
expect(hgRepos[0]).toMatch(/\/jest-changed-files-test-dir\/first-repo$/);
|
||||
expect(hgRepos[1]).toMatch(/\/jest-changed-files-test-dir\/second-repo$/);
|
||||
});
|
||||
|
||||
test('gets git SCM roots and dedups them', async () => {
|
||||
writeFiles(DIR, {
|
||||
'first_repo/file1.txt': 'file1',
|
||||
'first_repo/nested_dir/file2.txt': 'file2',
|
||||
'first_repo/nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'second_repo/file1.txt': 'file1',
|
||||
'second_repo/nested_dir/file2.txt': 'file2',
|
||||
'second_repo/nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'first-repo/file1.txt': 'file1',
|
||||
'first-repo/nested-dir/file2.txt': 'file2',
|
||||
'first-repo/nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
'second-repo/file1.txt': 'file1',
|
||||
'second-repo/nested-dir/file2.txt': 'file2',
|
||||
'second-repo/nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${GIT} init`, path.resolve(DIR, 'first_repo'));
|
||||
run(`${GIT} init`, path.resolve(DIR, 'second_repo'));
|
||||
run(`${GIT} init`, path.resolve(DIR, 'first-repo'));
|
||||
run(`${GIT} init`, path.resolve(DIR, 'second-repo'));
|
||||
|
||||
const roots = [
|
||||
'',
|
||||
'first_repo/nested_dir',
|
||||
'first_repo/nested_dir/second_nested_dir',
|
||||
'second_repo/nested_dir',
|
||||
'second_repo/nested_dir/second_nested_dir',
|
||||
'first-repo/nested-dir',
|
||||
'first-repo/nested-dir/second-nested-dir',
|
||||
'second-repo/nested-dir',
|
||||
'second-repo/nested-dir/second-nested-dir',
|
||||
].map(filename => path.resolve(DIR, filename));
|
||||
|
||||
const repos = await findRepos(roots);
|
||||
|
@ -94,29 +94,29 @@ test('gets git SCM roots and dedups them', async () => {
|
|||
// NOTE: This test can break if you have a .git repo initialized inside your
|
||||
// os tmp directory.
|
||||
expect(gitRepos).toHaveLength(2);
|
||||
expect(gitRepos[0]).toMatch(/\/jest_changed_files_test_dir\/first_repo$/);
|
||||
expect(gitRepos[1]).toMatch(/\/jest_changed_files_test_dir\/second_repo$/);
|
||||
expect(gitRepos[0]).toMatch(/\/jest-changed-files-test-dir\/first-repo$/);
|
||||
expect(gitRepos[1]).toMatch(/\/jest-changed-files-test-dir\/second-repo$/);
|
||||
});
|
||||
|
||||
test('gets mixed git and hg SCM roots and dedups them', async () => {
|
||||
writeFiles(DIR, {
|
||||
'first_repo/file1.txt': 'file1',
|
||||
'first_repo/nested_dir/file2.txt': 'file2',
|
||||
'first_repo/nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'second_repo/file1.txt': 'file1',
|
||||
'second_repo/nested_dir/file2.txt': 'file2',
|
||||
'second_repo/nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'first-repo/file1.txt': 'file1',
|
||||
'first-repo/nested-dir/file2.txt': 'file2',
|
||||
'first-repo/nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
'second-repo/file1.txt': 'file1',
|
||||
'second-repo/nested-dir/file2.txt': 'file2',
|
||||
'second-repo/nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${GIT} init`, path.resolve(DIR, 'first_repo'));
|
||||
run(`${HG} init`, path.resolve(DIR, 'second_repo'));
|
||||
run(`${GIT} init`, path.resolve(DIR, 'first-repo'));
|
||||
run(`${HG} init`, path.resolve(DIR, 'second-repo'));
|
||||
|
||||
const roots = [
|
||||
'',
|
||||
'first_repo/nested_dir',
|
||||
'first_repo/nested_dir/second_nested_dir',
|
||||
'second_repo/nested_dir',
|
||||
'second_repo/nested_dir/second_nested_dir',
|
||||
'first-repo/nested-dir',
|
||||
'first-repo/nested-dir/second-nested-dir',
|
||||
'second-repo/nested-dir',
|
||||
'second-repo/nested-dir/second-nested-dir',
|
||||
].map(filename => path.resolve(DIR, filename));
|
||||
|
||||
const repos = await findRepos(roots);
|
||||
|
@ -127,20 +127,20 @@ test('gets mixed git and hg SCM roots and dedups them', async () => {
|
|||
// inside your os tmp directory.
|
||||
expect(gitRepos).toHaveLength(1);
|
||||
expect(hgRepos).toHaveLength(1);
|
||||
expect(gitRepos[0]).toMatch(/\/jest_changed_files_test_dir\/first_repo$/);
|
||||
expect(hgRepos[0]).toMatch(/\/jest_changed_files_test_dir\/second_repo$/);
|
||||
expect(gitRepos[0]).toMatch(/\/jest-changed-files-test-dir\/first-repo$/);
|
||||
expect(hgRepos[0]).toMatch(/\/jest-changed-files-test-dir\/second-repo$/);
|
||||
});
|
||||
|
||||
test('gets changed files for git', async () => {
|
||||
writeFiles(DIR, {
|
||||
'file1.txt': 'file1',
|
||||
'nested_dir/file2.txt': 'file2',
|
||||
'nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'nested-dir/file2.txt': 'file2',
|
||||
'nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${GIT} init`, DIR);
|
||||
|
||||
const roots = ['', 'nested_dir', 'nested_dir/second_nested_dir'].map(
|
||||
const roots = ['', 'nested-dir', 'nested-dir/second-nested-dir'].map(
|
||||
filename => path.resolve(DIR, filename),
|
||||
);
|
||||
|
||||
|
@ -228,13 +228,13 @@ test('gets changed files for git', async () => {
|
|||
test('monitors only root paths for git', async () => {
|
||||
writeFiles(DIR, {
|
||||
'file1.txt': 'file1',
|
||||
'nested_dir/file2.txt': 'file2',
|
||||
'nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'nested-dir/file2.txt': 'file2',
|
||||
'nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${GIT} init`, DIR);
|
||||
|
||||
const roots = [path.resolve(DIR, 'nested_dir')];
|
||||
const roots = [path.resolve(DIR, 'nested-dir')];
|
||||
|
||||
const {changedFiles: files} = await getChangedFilesForRoots(roots, {});
|
||||
expect(
|
||||
|
@ -272,13 +272,13 @@ test('gets changed files for hg', async () => {
|
|||
}
|
||||
writeFiles(DIR, {
|
||||
'file1.txt': 'file1',
|
||||
'nested_dir/file2.txt': 'file2',
|
||||
'nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'nested-dir/file2.txt': 'file2',
|
||||
'nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${HG} init`, DIR);
|
||||
|
||||
const roots = ['', 'nested_dir', 'nested_dir/second_nested_dir'].map(
|
||||
const roots = ['', 'nested-dir', 'nested-dir/second-nested-dir'].map(
|
||||
filename => path.resolve(DIR, filename),
|
||||
);
|
||||
|
||||
|
@ -375,13 +375,13 @@ test('monitors only root paths for hg', async () => {
|
|||
}
|
||||
writeFiles(DIR, {
|
||||
'file1.txt': 'file1',
|
||||
'nested_dir/file2.txt': 'file2',
|
||||
'nested_dir/second_nested_dir/file3.txt': 'file3',
|
||||
'nested-dir/file2.txt': 'file2',
|
||||
'nested-dir/second-nested-dir/file3.txt': 'file3',
|
||||
});
|
||||
|
||||
run(`${HG} init`, DIR);
|
||||
|
||||
const roots = [path.resolve(DIR, 'nested_dir')];
|
||||
const roots = [path.resolve(DIR, 'nested-dir')];
|
||||
|
||||
const {changedFiles: files} = await getChangedFilesForRoots(roots, {});
|
||||
expect(
|
|
@ -14,7 +14,7 @@ import os from 'os';
|
|||
import {cleanup, writeFiles} from '../Utils';
|
||||
import runJest from '../runJest';
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'jest_require_actual_test');
|
||||
const DIR = path.resolve(os.tmpdir(), 'jest-require-actual-test');
|
||||
|
||||
beforeEach(() => cleanup(DIR));
|
||||
afterAll(() => cleanup(DIR));
|
|
@ -14,7 +14,7 @@ import os from 'os';
|
|||
import {cleanup, writeFiles} from '../Utils';
|
||||
import runJest from '../runJest';
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'jest_require_mock_test');
|
||||
const DIR = path.resolve(os.tmpdir(), 'jest-require-mock-test');
|
||||
|
||||
beforeEach(() => cleanup(DIR));
|
||||
afterAll(() => cleanup(DIR));
|
|
@ -11,7 +11,7 @@
|
|||
import runJest from '../runJest';
|
||||
|
||||
test('module.parent should be null in test files', () => {
|
||||
const {status} = runJest('module_parent_null_in_test');
|
||||
const {status} = runJest('module-parent-null-in-test');
|
||||
|
||||
expect(status).toBe(0);
|
||||
});
|
|
@ -15,7 +15,7 @@ import path from 'path';
|
|||
import stripAnsi from 'strip-ansi';
|
||||
import {cleanup, extractSummary, sortLines, writeFiles} from '../Utils';
|
||||
|
||||
const DIR = path.resolve(os.tmpdir(), 'multi_project_runner_test');
|
||||
const DIR = path.resolve(os.tmpdir(), 'multi-project-runner-test');
|
||||
|
||||
const SAMPLE_FILE_CONTENT = 'module.exports = {};';
|
||||
|
||||
|
@ -27,7 +27,7 @@ test('--listTests doesnt duplicate the test files', () => {
|
|||
'.watchmanconfig': '',
|
||||
'/project1.js': `module.exports = {rootDir: './', displayName: 'BACKEND'}`,
|
||||
'/project2.js': `module.exports = {rootDir: './', displayName: 'BACKEND'}`,
|
||||
'__tests__/in_both_projects-test.js': `test('test', () => {});`,
|
||||
'__tests__/inBothProjectsTest.js': `test('test', () => {});`,
|
||||
'package.json': JSON.stringify({
|
||||
jest: {projects: ['<rootDir>/project1.js', '<rootDir>/project2.js']},
|
||||
}),
|
||||
|
@ -35,7 +35,7 @@ test('--listTests doesnt duplicate the test files', () => {
|
|||
|
||||
const {stdout} = runJest(DIR, ['--listTests']);
|
||||
expect(stdout.split('\n')).toHaveLength(1);
|
||||
expect(stdout).toMatch('in_both_projects-test.js');
|
||||
expect(stdout).toMatch('inBothProjectsTest.js');
|
||||
});
|
||||
|
||||
test('can pass projects or global config', () => {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue