456 KiB
fixtures/external/jest/jest-test-results.xml
4239 tests were completed in 165.872s with 4207 passed, 30 skipped and 2 failed.
Test Suites
packages/jest-config/src/tests/normalize.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | picks a name based on the rootDir | 6ms |
| ✔️ | keeps custom project name based on the projects rootDir | 1ms |
| ✔️ | keeps custom names based on the rootDir | 1ms |
| ✔️ | minimal config is stable across runs | 3ms |
| ✔️ | sets coverageReporters correctly when argv.json is set | 1ms |
rootDir
| Result | Test | Time |
|---|---|---|
| ✔️ | throws if the options is missing a rootDir property | 2ms |
automock
| Result | Test | Time |
|---|---|---|
| ✔️ | falsy automock is not overwritten | 1ms |
collectCoverageOnlyFrom
| Result | Test | Time |
|---|---|---|
| ✔️ | normalizes all paths relative to rootDir | 1ms |
| ✔️ | does not change absolute paths | 1ms |
| ✔️ | substitutes tokens | 1ms |
collectCoverageFrom
| Result | Test | Time |
|---|---|---|
| ✔️ | substitutes tokens | 1ms |
findRelatedTests
| Result | Test | Time |
|---|---|---|
| ✔️ | it generates --coverageCoverageFrom patterns when needed | 1ms |
roots
| Result | Test | Time |
|---|---|---|
| ✔️ | normalizes all paths relative to rootDir | 1ms |
| ✔️ | does not change absolute paths | 1ms |
| ✔️ | substitutes tokens | 1ms |
transform
| Result | Test | Time |
|---|---|---|
| ✔️ | normalizes the path | 1ms |
| ✔️ | pulls in config if it's passed as an array, and defaults to empty object | 1ms |
haste
| Result | Test | Time |
|---|---|---|
| ✔️ | normalizes the path for hasteImplModulePath | 1ms |
setupFilesAfterEnv
| Result | Test | Time |
|---|---|---|
| ✔️ | normalizes the path according to rootDir | 1ms |
| ✔️ | does not change absolute paths | 1ms |
| ✔️ | substitutes tokens | 1ms |
setupTestFrameworkScriptFile
| Result | Test | Time |
|---|---|---|
| ✔️ | logs a deprecation warning when setupTestFrameworkScriptFile is used |
1ms |
| ✔️ | logs an error when setupTestFrameworkScriptFile and setupFilesAfterEnv are used |
1ms |
coveragePathIgnorePatterns
| Result | Test | Time |
|---|---|---|
| ✔️ | does not normalize paths relative to rootDir | 1ms |
| ✔️ | does not normalize trailing slashes | 1ms |
| ✔️ | substitutes tokens | 1ms |
watchPathIgnorePatterns
| Result | Test | Time |
|---|---|---|
| ✔️ | does not normalize paths relative to rootDir | 5ms |
| ✔️ | does not normalize trailing slashes | 1ms |
| ✔️ | substitutes tokens | 1ms |
testPathIgnorePatterns
| Result | Test | Time |
|---|---|---|
| ✔️ | does not normalize paths relative to rootDir | 1ms |
| ✔️ | does not normalize trailing slashes | 1ms |
| ✔️ | substitutes tokens | 1ms |
modulePathIgnorePatterns
| Result | Test | Time |
|---|---|---|
| ✔️ | does not normalize paths relative to rootDir | 1ms |
| ✔️ | does not normalize trailing slashes | 1ms |
| ✔️ | substitutes tokens | 1ms |
testRunner
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to Circus | 1ms |
| ✔️ | resolves jasmine | 1ms |
| ✔️ | is overwritten by argv | 0ms |
coverageDirectory
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to /coverage | 0ms |
testEnvironment
| Result | Test | Time |
|---|---|---|
| ✔️ | resolves to an environment and prefers jest-environment-name |
0ms |
| ✔️ | throws on invalid environment names | 1ms |
| ✔️ | works with rootDir | 1ms |
babel-jest
| Result | Test | Time |
|---|---|---|
| ✔️ | correctly identifies and uses babel-jest | 1ms |
| ✔️ | uses babel-jest if babel-jest is explicitly specified in a custom transform options | 1ms |
Upgrade help
| Result | Test | Time |
|---|---|---|
| ✔️ | logs a warning when scriptPreprocessor and/or preprocessorIgnorePatterns are used |
2ms |
testRegex
| Result | Test | Time |
|---|---|---|
| ✔️ | testRegex empty string is mapped to empty array | 3ms |
| ✔️ | testRegex string is mapped to an array | 0ms |
| ✔️ | testRegex array is preserved | 0ms |
testMatch
| Result | Test | Time |
|---|---|---|
| ✔️ | testMatch default not applied if testRegex is set | 1ms |
| ✔️ | testRegex default not applied if testMatch is set | 1ms |
| ✔️ | throws if testRegex and testMatch are both specified | 1ms |
| ✔️ | normalizes testMatch | 0ms |
moduleDirectories
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to node_modules | 8ms |
| ✔️ | normalizes moduleDirectories | 1ms |
preset
| Result | Test | Time |
|---|---|---|
| ✔️ | throws when preset not found | 1ms |
| ✔️ | throws when module was found but no "jest-preset.js" or "jest-preset.json" files | 1ms |
| ✔️ | throws when a dependency is missing in the preset | 44ms |
| ✔️ | throws when preset is invalid | 59ms |
| ✔️ | throws when preset evaluation throws type error | 1ms |
| ✔️ | works with "react-native" | 3ms |
| ✔️ | searches for .json and .js preset files | 0ms |
| ✔️ | merges with options | 1ms |
| ✔️ | merges with options and moduleNameMapper preset is overridden by options | 1ms |
| ✔️ | merges with options and transform preset is overridden by options | 1ms |
| ✔️ | extracts setupFilesAfterEnv from preset | 1ms |
preset with globals
| Result | Test | Time |
|---|---|---|
| ✔️ | should merge the globals preset correctly | 1ms |
preset without setupFiles
| Result | Test | Time |
|---|---|---|
| ✔️ | should normalize setupFiles correctly | 1ms |
preset without setupFilesAfterEnv
| Result | Test | Time |
|---|---|---|
| ✔️ | should normalize setupFilesAfterEnv correctly | 1ms |
runner
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to jest-runner |
1ms |
| ✔️ | resolves to runners that do not have the prefix | 1ms |
| ✔️ | resolves to runners and prefers jest-runner-name |
1ms |
| ✔️ | throw error when a runner is not found | 7ms |
watchPlugins
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to undefined | 0ms |
| ✔️ | resolves to watch plugins and prefers jest-watch-name |
0ms |
| ✔️ | resolves watch plugins that do not have the prefix | 1ms |
| ✔️ | normalizes multiple watchPlugins | 4ms |
| ✔️ | throw error when a watch plugin is not found | 1ms |
testPathPattern
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to empty | 0ms |
| ✔️ | joins multiple --testPathPatterns and | 3ms |
| ✔️ | gives precedence to --all | 1ms |
testPathPattern --testPathPattern
| Result | Test | Time |
|---|---|---|
| ✔️ | uses --testPathPattern if set | 0ms |
| ✔️ | ignores invalid regular expressions and logs a warning | 1ms |
| ✔️ | joins multiple --testPathPattern if set | 1ms |
testPathPattern --testPathPattern posix
| Result | Test | Time |
|---|---|---|
| ✔️ | should not escape the pattern | 1ms |
testPathPattern --testPathPattern win32
| Result | Test | Time |
|---|---|---|
| ✔️ | preserves any use of "" | 1ms |
| ✔️ | replaces POSIX path separators | 9ms |
| ✔️ | replaces POSIX paths in multiple args | 8ms |
| ✔️ | coerces all patterns to strings | 2ms |
testPathPattern
| Result | Test | Time |
|---|---|---|
| ✔️ | uses if set | 3ms |
| ✔️ | ignores invalid regular expressions and logs a warning | 1ms |
| ✔️ | joins multiple if set | 1ms |
testPathPattern posix
| Result | Test | Time |
|---|---|---|
| ✔️ | should not escape the pattern | 1ms |
testPathPattern win32
| Result | Test | Time |
|---|---|---|
| ✔️ | preserves any use of "" | 15ms |
| ✔️ | replaces POSIX path separators | 14ms |
| ✔️ | replaces POSIX paths in multiple args | 11ms |
| ✔️ | coerces all patterns to strings | 4ms |
moduleFileExtensions
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to something useful | 0ms |
| ✔️ | throws if missing js but using jest-runner |
1ms |
| ✔️ | does not throw if missing js with a custom runner |
2ms |
cwd
| Result | Test | Time |
|---|---|---|
| ✔️ | is set to process.cwd | 1ms |
| ✔️ | is not lost if the config has its own cwd property | 6ms |
Defaults
| Result | Test | Time |
|---|---|---|
| ✔️ | should be accepted by normalize | 3ms |
displayName
| Result | Test | Time |
|---|---|---|
| ✔️ | should throw an error when displayName is is an empty object | 1ms |
| ✔️ | should throw an error when displayName is missing color | 1ms |
| ✔️ | should throw an error when displayName is missing name | 1ms |
| ✔️ | should throw an error when displayName is using invalid values | 0ms |
| ✔️ | generates a default color for the runner undefined | 1ms |
| ✔️ | generates a default color for the runner jest-runner | 2ms |
| ✔️ | generates a default color for the runner jest-runner-eslint | 1ms |
| ✔️ | generates a default color for the runner jest-runner-tslint | 1ms |
| ✔️ | generates a default color for the runner jest-runner-tsc | 7ms |
testTimeout
| Result | Test | Time |
|---|---|---|
| ✔️ | should return timeout value if defined | 1ms |
| ✔️ | should throw an error if timeout is a negative number | 0ms |
extensionsToTreatAsEsm
| Result | Test | Time |
|---|---|---|
| ✔️ | should pass valid config through | 2ms |
| ✔️ | should enforce leading dots | 1ms |
| ✔️ | throws on .js | 4ms |
| ✔️ | throws on .mjs | 0ms |
| ✔️ | throws on .cjs | 1ms |
packages/jest-repl/src/tests/jest_repl.test.js ✔️
Repl cli
| Result | Test | Time |
|---|---|---|
| ✔️ | runs without errors | 1028ms |
packages/jest-snapshot/src/tests/printSnapshot.test.ts ✔️
chalk
| Result | Test | Time |
|---|---|---|
| ✔️ | level 0 | 2ms |
| ✔️ | level 1 | 1ms |
| ✔️ | level 2 | 1ms |
| ✔️ | level 3 | 0ms |
matcher error toMatchInlineSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | Expected properties must be an object (non-null) without snapshot | 1ms |
| ✔️ | Expected properties must be an object (null) with snapshot | 1ms |
| ✔️ | Inline snapshot must be a string | 0ms |
| ✔️ | Snapshot matchers cannot be used with not | 0ms |
matcher error toMatchSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | Expected properties must be an object (non-null) | 1ms |
| ✔️ | Expected properties must be an object (null) with hint | 0ms |
| ✔️ | Expected properties must be an object (null) without hint | 1ms |
| ✔️ | Snapshot state must be initialized | 0ms |
matcher error toMatchSnapshot received value must be an object
| Result | Test | Time |
|---|---|---|
| ✔️ | (non-null) | 0ms |
| ✔️ | (null) | 1ms |
matcher error toThrowErrorMatchingInlineSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | Inline snapshot must be a string | 4ms |
| ✔️ | Snapshot state must be initialized | 1ms |
matcher error toThrowErrorMatchingSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | Received value must be a function | 0ms |
| ✔️ | Snapshot matchers cannot be used with not | 1ms |
other error toThrowErrorMatchingSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | Received function did not throw | 0ms |
pass false toMatchInlineSnapshot with properties equals false
| Result | Test | Time |
|---|---|---|
| ✔️ | with snapshot | 8ms |
| ✔️ | without snapshot | 0ms |
pass false toMatchInlineSnapshot with properties
| Result | Test | Time |
|---|---|---|
| ✔️ | equals true | 1ms |
pass false toMatchSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | New snapshot was not written (multi line) | 0ms |
| ✔️ | New snapshot was not written (single line) | 0ms |
pass false toMatchSnapshot with properties equals false
| Result | Test | Time |
|---|---|---|
| ✔️ | isLineDiffable false | 0ms |
| ✔️ | isLineDiffable true | 1ms |
pass false toMatchSnapshot with properties
| Result | Test | Time |
|---|---|---|
| ✔️ | equals true | 0ms |
pass false toThrowErrorMatchingInlineSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | with snapshot | 1ms |
pass true toMatchSnapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | without properties | 0ms |
printPropertiesAndReceived
| Result | Test | Time |
|---|---|---|
| ✔️ | omit missing properties | 4ms |
printSnapshotAndReceived backtick
| Result | Test | Time |
|---|---|---|
| ✔️ | single line expected and received | 0ms |
printSnapshotAndReceived empty string
| Result | Test | Time |
|---|---|---|
| ✔️ | expected and received single line | 0ms |
| ✔️ | received and expected multi line | 0ms |
printSnapshotAndReceived escape
| Result | Test | Time |
|---|---|---|
| ✔️ | double quote marks in string | 0ms |
| ✔️ | backslash in multi line string | 0ms |
| ✔️ | backslash in single line string | 1ms |
| ✔️ | regexp | 0ms |
printSnapshotAndReceived expand
| Result | Test | Time |
|---|---|---|
| ✔️ | false | 1ms |
| ✔️ | true | 0ms |
printSnapshotAndReceived
| Result | Test | Time |
|---|---|---|
| ✔️ | fallback to line diff | 21ms |
| ✔️ | multi line small change in one line and other is unchanged | 0ms |
| ✔️ | multi line small changes | 1ms |
| ✔️ | single line large changes | 0ms |
printSnapshotAndReceived has no common after clean up chaff
| Result | Test | Time |
|---|---|---|
| ✔️ | array | 0ms |
| ✔️ | string single line | 1ms |
printSnapshotAndReceived MAX_DIFF_STRING_LENGTH unquoted
| Result | Test | Time |
|---|---|---|
| ✔️ | both are less | 0ms |
| ✔️ | expected is more | 3ms |
| ✔️ | received is more | 4ms |
printSnapshotAndReceived MAX_DIFF_STRING_LENGTH quoted
| Result | Test | Time |
|---|---|---|
| ✔️ | both are less | 0ms |
| ✔️ | expected is more | 0ms |
| ✔️ | received is more | 1ms |
printSnapshotAndReceived isLineDiffable false
| Result | Test | Time |
|---|---|---|
| ✔️ | asymmetric matcher | 0ms |
| ✔️ | boolean | 0ms |
| ✔️ | date | 0ms |
| ✔️ | error | 1ms |
| ✔️ | function | 0ms |
| ✔️ | number | 0ms |
printSnapshotAndReceived isLineDiffable true
| Result | Test | Time |
|---|---|---|
| ✔️ | array | 1ms |
| ✔️ | object | 0ms |
| ✔️ | single line expected and received | 1ms |
| ✔️ | single line expected and multi line received | 0ms |
printSnapshotAndReceived ignore indentation
| Result | Test | Time |
|---|---|---|
| ✔️ | markup delete | 1ms |
| ✔️ | markup fall back | 2ms |
| ✔️ | markup insert | 0ms |
printSnapshotAndReceived ignore indentation object
| Result | Test | Time |
|---|---|---|
| ✔️ | delete | 0ms |
| ✔️ | insert | 0ms |
printSnapshotAndReceived without serialize
| Result | Test | Time |
|---|---|---|
| ✔️ | backtick single line expected and received | 1ms |
| ✔️ | backtick single line expected and multi line received | 1ms |
| ✔️ | has no common after clean up chaff multi line | 0ms |
| ✔️ | has no common after clean up chaff single line | 0ms |
| ✔️ | prettier/pull/5590 | 1ms |
packages/jest-config/src/tests/Defaults.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | get configuration defaults | 0ms |
packages/jest-resolve/src/tests/resolve.test.ts ✔️
isCoreModule
| Result | Test | Time |
|---|---|---|
| ✔️ | returns false if hasCoreModules is false. |
0ms |
| ✔️ | returns true if hasCoreModules is true and moduleName is a core module. |
0ms |
| ✔️ | returns false if hasCoreModules is true and moduleName is not a core module. |
0ms |
| ✔️ | returns false if hasCoreModules is true and moduleNameMapper alias a module same name with core module |
1ms |
findNodeModule
| Result | Test | Time |
|---|---|---|
| ✔️ | is possible to override the default resolver | 1ms |
| ✔️ | passes packageFilter to the resolve module when using the default resolver | 1ms |
resolveModule
| Result | Test | Time |
|---|---|---|
| ✔️ | is possible to resolve node modules | 2ms |
| ✔️ | is possible to resolve node modules with custom extensions | 2ms |
| ✔️ | is possible to resolve node modules with custom extensions and platforms | 0ms |
| ✔️ | is possible to resolve node modules by resolving their realpath | 0ms |
| ✔️ | is possible to specify custom resolve paths | 1ms |
| ✔️ | does not confuse directories with files | 1ms |
getMockModule
| Result | Test | Time |
|---|---|---|
| ✔️ | is possible to use custom resolver to resolve deps inside mock modules with moduleNameMapper | 1ms |
nodeModulesPaths
| Result | Test | Time |
|---|---|---|
| ✔️ | provides custom module paths after node_modules | 0ms |
Resolver.getModulePaths() -> nodeModulesPaths()
| Result | Test | Time |
|---|---|---|
| ✔️ | can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms | 21ms |
| ✔️ | can resolve node modules relative to absolute paths in "moduleDirectories" on Posix platforms | 8ms |
packages/expect/src/tests/matchers-toEqual.property.test.ts ✔️
toEqual
| Result | Test | Time |
|---|---|---|
| ✔️ | should be reflexive | 58ms |
| ✔️ | should be symmetric | 204ms |
packages/jest-reporters/src/tests/SummaryReporter.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | snapshots needs update with npm test | 250ms |
| ✔️ | snapshots needs update with yarn test | 4ms |
| ✔️ | snapshots all have results (no update) | 4ms |
| ✔️ | snapshots all have results (after update) | 10ms |
packages/jest-config/src/tests/readConfigs.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | readConfigs() throws when called without project paths | 16ms |
| ✔️ | readConfigs() loads async config file | 10ms |
| ✔️ | readConfigs() reject if async was rejected | 0ms |
packages/jest-reporters/src/tests/generateEmptyCoverage.test.js ✔️
generateEmptyCoverage
| Result | Test | Time |
|---|---|---|
| ✔️ | generates an empty coverage object for a file without running it | 370ms |
| ✔️ | generates a null coverage result when using /* istanbul ignore file */ | 15ms |
| ✔️ | generates a null coverage result when collectCoverage global config is false | 1ms |
packages/expect/src/tests/asymmetricMatchers.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Any.asymmetricMatch() | 1ms |
| ✔️ | Any.toAsymmetricMatcher() | 1ms |
| ✔️ | Any.toAsymmetricMatcher() with function name | 1ms |
| ✔️ | Any throws when called with empty constructor | 47ms |
| ✔️ | Anything matches any type | 1ms |
| ✔️ | Anything does not match null and undefined | 0ms |
| ✔️ | Anything.toAsymmetricMatcher() | 0ms |
| ✔️ | ArrayContaining matches | 4ms |
| ✔️ | ArrayContaining does not match | 0ms |
| ✔️ | ArrayContaining throws for non-arrays | 1ms |
| ✔️ | ArrayNotContaining matches | 0ms |
| ✔️ | ArrayNotContaining does not match | 1ms |
| ✔️ | ArrayNotContaining throws for non-arrays | 0ms |
| ✔️ | ObjectContaining matches | 1ms |
| ✔️ | ObjectContaining does not match | 0ms |
| ✔️ | ObjectContaining matches defined properties | 0ms |
| ✔️ | ObjectContaining matches prototype properties | 0ms |
| ✔️ | ObjectContaining throws for non-objects | 1ms |
| ✔️ | ObjectContaining does not mutate the sample | 0ms |
| ✔️ | ObjectNotContaining matches | 0ms |
| ✔️ | ObjectNotContaining does not match | 1ms |
| ✔️ | ObjectNotContaining inverts ObjectContaining | 0ms |
| ✔️ | ObjectNotContaining throws for non-objects | 0ms |
| ✔️ | StringContaining matches string against string | 0ms |
| ✔️ | StringContaining throws if expected value is not string | 0ms |
| ✔️ | StringContaining returns false if received value is not string | 0ms |
| ✔️ | StringNotContaining matches string against string | 0ms |
| ✔️ | StringNotContaining throws if expected value is not string | 0ms |
| ✔️ | StringNotContaining returns true if received value is not string | 0ms |
| ✔️ | StringMatching matches string against regexp | 1ms |
| ✔️ | StringMatching matches string against string | 0ms |
| ✔️ | StringMatching throws if expected value is neither string nor regexp | 0ms |
| ✔️ | StringMatching returns false if received value is not string | 1ms |
| ✔️ | StringMatching returns false even if coerced non-string received value matches pattern | 0ms |
| ✔️ | StringNotMatching matches string against regexp | 0ms |
| ✔️ | StringNotMatching matches string against string | 0ms |
| ✔️ | StringNotMatching throws if expected value is neither string nor regexp | 0ms |
| ✔️ | StringNotMatching returns true if received value is not string | 0ms |
packages/jest-reporters/src/tests/CoverageReporter.test.js ✔️
onRunComplete
| Result | Test | Time |
|---|---|---|
| ✔️ | getLastError() returns an error when threshold is not met for global | 299ms |
| ✔️ | getLastError() returns an error when threshold is not met for file | 3ms |
| ✔️ | getLastError() returns undefined when threshold is met |
2ms |
| ✔️ | getLastError() returns an error when threshold is not met for non-covered file | 1ms |
| ✔️ | getLastError() returns an error when threshold is not met for directory | 1ms |
| ✔️ | getLastError() returns undefined when threshold is met for directory |
1ms |
| ✔️ | getLastError() returns an error when there is no coverage data for a threshold | 0ms |
| ✔️ | getLastError() returns 'undefined' when global threshold group | |
| is empty because PATH and GLOB threshold groups have matched all the | ||
| files in the coverage data. | 1ms | |
| ✔️ | getLastError() returns 'undefined' when file and directory path | |
| threshold groups overlap | 2ms | |
| ✔️ | that if globs or paths are specified alongside global, coverage | |
| data for matching paths will be subtracted from overall coverage | ||
| and thresholds will be applied independently | 1ms | |
| ✔️ | that files are matched by all matching threshold groups | 1ms |
| ✔️ | that it passes custom options when creating reporters | 2ms |
packages/jest-snapshot/src/tests/InlineSnapshots.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | saveInlineSnapshots() replaces empty function call with a template literal | 63ms |
| ✔️ | saveInlineSnapshots() without prettier leaves formatting outside of snapshots alone | 7ms |
| ✔️ | saveInlineSnapshots() can handle typescript without prettier | 8ms |
| ✔️ | saveInlineSnapshots() can handle tsx without prettier | 6ms |
| ✔️ | saveInlineSnapshots() can handle flow and jsx without prettier | 35ms |
| ✔️ | saveInlineSnapshots() can use prettier to fix formatting for whole file | 17ms |
| ✔️ | saveInlineSnapshots() replaces existing template literal - babel parser | 5ms |
| ✔️ | saveInlineSnapshots() replaces existing template literal - flow parser | 169ms |
| ✔️ | saveInlineSnapshots() replaces existing template literal - typescript parser | 155ms |
| ✔️ | saveInlineSnapshots() replaces existing template literal with property matchers | 17ms |
| ✔️ | saveInlineSnapshots() creates template literal with property matchers | 5ms |
| ✔️ | saveInlineSnapshots() creates template literal with property matchers | 2ms |
| ✔️ | saveInlineSnapshots() throws if frame does not match | 22ms |
| ✔️ | saveInlineSnapshots() throws if multiple calls to to the same location | 3ms |
| ✔️ | saveInlineSnapshots() uses escaped backticks | 6ms |
| ✔️ | saveInlineSnapshots() works with non-literals in expect call | 8ms |
| ✔️ | saveInlineSnapshots() indents multi-line snapshots with spaces | 13ms |
| ✔️ | saveInlineSnapshots() does not re-indent error snapshots | 22ms |
| ✔️ | saveInlineSnapshots() does not re-indent already indented snapshots | 11ms |
| ✔️ | saveInlineSnapshots() indents multi-line snapshots with tabs | 12ms |
| ✔️ | saveInlineSnapshots() indents snapshots after prettier reformats | 16ms |
| ✔️ | saveInlineSnapshots() does not indent empty lines | 7ms |
packages/jest-config/src/tests/readConfig.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | readConfig() throws when an object is passed without a file path | 16ms |
packages/jest-watcher/src/lib/tests/scroll.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | When offset is -1 | 0ms |
| ✔️ | When offset is in the first set of items | 0ms |
| ✔️ | When offset is in the middle of the list | 0ms |
| ✔️ | When offset is at the end of the list | 1ms |
| ✔️ | When offset is at the end and size is smaller than max | 0ms |
packages/expect/src/tests/toThrowMatchers.test.ts ✔️
toThrowError
| Result | Test | Time |
|---|---|---|
| ✔️ | to throw or not to throw | 1ms |
| ✔️ | invalid arguments | 0ms |
| ✔️ | invalid actual | 1ms |
toThrowError substring
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 0ms |
| ✔️ | did not throw at all | 2ms |
| ✔️ | threw, but message did not match (error) | 4ms |
| ✔️ | threw, but message did not match (non-error falsey) | 1ms |
| ✔️ | properly escapes strings when matching against errors | 37ms |
| ✔️ | threw, but message should not match (error) | 1ms |
| ✔️ | threw, but message should not match (non-error truthy) | 0ms |
toThrowError regexp
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 1ms |
| ✔️ | did not throw at all | 0ms |
| ✔️ | threw, but message did not match (error) | 1ms |
| ✔️ | threw, but message did not match (non-error falsey) | 8ms |
| ✔️ | threw, but message should not match (error) | 1ms |
| ✔️ | threw, but message should not match (non-error truthy) | 0ms |
toThrowError error class
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 1ms |
| ✔️ | did not throw at all | 0ms |
| ✔️ | threw, but class did not match (error) | 0ms |
| ✔️ | threw, but class did not match (non-error falsey) | 1ms |
| ✔️ | threw, but class should not match (error) | 0ms |
| ✔️ | threw, but class should not match (error subclass) | 1ms |
| ✔️ | threw, but class should not match (error subsubclass) | 4ms |
toThrowError error-message pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 1ms |
toThrowError error-message fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 1ms |
| ✔️ | multiline diff highlight incorrect expected space | 1ms |
toThrowError asymmetric any-Class pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrowError asymmetric any-Class fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 1ms |
toThrowError asymmetric anything pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrowError asymmetric anything fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 0ms |
toThrowError asymmetric no-symbol pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrowError asymmetric no-symbol fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 1ms |
toThrowError asymmetric objectContaining pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrowError asymmetric objectContaining fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 4ms |
toThrowError promise/async throws if Error-like object is returned
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 3ms |
| ✔️ | did not throw at all | 0ms |
| ✔️ | threw, but class did not match | 1ms |
| ✔️ | threw, but should not have | 0ms |
toThrowError expected is undefined
| Result | Test | Time |
|---|---|---|
| ✔️ | threw, but should not have (non-error falsey) | 0ms |
toThrow
| Result | Test | Time |
|---|---|---|
| ✔️ | to throw or not to throw | 0ms |
| ✔️ | invalid arguments | 1ms |
| ✔️ | invalid actual | 0ms |
toThrow substring
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 0ms |
| ✔️ | did not throw at all | 1ms |
| ✔️ | threw, but message did not match (error) | 0ms |
| ✔️ | threw, but message did not match (non-error falsey) | 1ms |
| ✔️ | properly escapes strings when matching against errors | 0ms |
| ✔️ | threw, but message should not match (error) | 1ms |
| ✔️ | threw, but message should not match (non-error truthy) | 0ms |
toThrow regexp
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 0ms |
| ✔️ | did not throw at all | 1ms |
| ✔️ | threw, but message did not match (error) | 0ms |
| ✔️ | threw, but message did not match (non-error falsey) | 0ms |
| ✔️ | threw, but message should not match (error) | 0ms |
| ✔️ | threw, but message should not match (non-error truthy) | 0ms |
toThrow error class
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 0ms |
| ✔️ | did not throw at all | 0ms |
| ✔️ | threw, but class did not match (error) | 1ms |
| ✔️ | threw, but class did not match (non-error falsey) | 0ms |
| ✔️ | threw, but class should not match (error) | 0ms |
| ✔️ | threw, but class should not match (error subclass) | 0ms |
| ✔️ | threw, but class should not match (error subsubclass) | 0ms |
toThrow error-message pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrow error-message fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 1ms |
| ✔️ | multiline diff highlight incorrect expected space | 4ms |
toThrow asymmetric any-Class pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrow asymmetric any-Class fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 0ms |
toThrow asymmetric anything pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrow asymmetric anything fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrow asymmetric no-symbol pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrow asymmetric no-symbol fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 1ms |
toThrow asymmetric objectContaining pass
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toThrow asymmetric objectContaining fail
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 0ms |
toThrow promise/async throws if Error-like object is returned
| Result | Test | Time |
|---|---|---|
| ✔️ | passes | 1ms |
| ✔️ | did not throw at all | 1ms |
| ✔️ | threw, but class did not match | 0ms |
| ✔️ | threw, but should not have | 1ms |
toThrow expected is undefined
| Result | Test | Time |
|---|---|---|
| ✔️ | threw, but should not have (non-error falsey) | 0ms |
packages/jest-validate/src/tests/validate.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | recursively validates default Jest config | 0ms |
| ✔️ | recursively validates default jest-validate config | 1ms |
| ✔️ | pretty prints valid config for Boolean | 1ms |
| ✔️ | pretty prints valid config for Array | 0ms |
| ✔️ | pretty prints valid config for String | 1ms |
| ✔️ | pretty prints valid config for Object | 0ms |
| ✔️ | pretty prints valid config for Function | 0ms |
| ✔️ | omits null and undefined config values | 0ms |
| ✔️ | recursively omits null and undefined config values | 0ms |
| ✔️ | treat async and non-async functions as equivalent | 0ms |
| ✔️ | treat async and non-async functions as equivalent | 0ms |
| ✔️ | treat async and non-async functions as equivalent | 0ms |
| ✔️ | treat async and non-async functions as equivalent | 0ms |
| ✔️ | respects recursiveDenylist | 1ms |
| ✔️ | displays warning for unknown config options | 1ms |
| ✔️ | displays warning for deprecated config options | 0ms |
| ✔️ | works with custom warnings | 1ms |
| ✔️ | works with custom errors | 0ms |
| ✔️ | works with custom deprecations | 1ms |
| ✔️ | works with multiple valid types | 0ms |
| ✔️ | reports errors nicely when failing with multiple valid options | 0ms |
| ✔️ | Repeated types within multiple valid examples are coalesced in error report | 1ms |
| ✔️ | Comments in config JSON using "//" key are not warned | 0ms |
packages/jest-snapshot/src/tests/SnapshotResolver.test.ts ✔️
defaults
| Result | Test | Time |
|---|---|---|
| ✔️ | returns cached object if called multiple times | 0ms |
| ✔️ | resolveSnapshotPath() | 1ms |
| ✔️ | resolveTestPath() | 0ms |
custom resolver in project config
| Result | Test | Time |
|---|---|---|
| ✔️ | returns cached object if called multiple times | 4ms |
| ✔️ | resolveSnapshotPath() | 0ms |
| ✔️ | resolveTestPath() | 0ms |
malformed custom resolver in project config
| Result | Test | Time |
|---|---|---|
| ✔️ | missing resolveSnapshotPath throws | 8ms |
| ✔️ | missing resolveTestPath throws | 10ms |
| ✔️ | missing testPathForConsistencyCheck throws | 4ms |
| ✔️ | inconsistent functions throws | 20ms |
packages/jest-reporters/src/tests/CoverageWorker.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | resolves to the result of generateEmptyCoverage upon success | 127ms |
| ✔️ | throws errors on invalid JavaScript | 5ms |
packages/babel-jest/src/tests/index.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Returns source string with inline maps when no transformOptions is passed | 177ms |
| ✔️ | can pass null to createTransformer | 17ms |
caller option correctly merges from defaults and options
| Result | Test | Time |
|---|---|---|
| ✔️ | {"supportsDynamicImport":true,"supportsStaticESM":true} -> {"supportsDynamicImport":true,"supportsStaticESM":true} | 6ms |
| ✔️ | {"supportsDynamicImport":false,"supportsStaticESM":false} -> {"supportsDynamicImport":false,"supportsStaticESM":false} | 11ms |
| ✔️ | {"supportsStaticESM":false} -> {"supportsDynamicImport":false,"supportsStaticESM":false} | 13ms |
| ✔️ | {"supportsDynamicImport":true} -> {"supportsDynamicImport":true,"supportsStaticESM":false} | 11ms |
packages/jest-config/src/tests/resolveConfigPath.test.ts ✔️
Resolve config path .js
| Result | Test | Time |
|---|---|---|
| ✔️ | file path with ".js" | 9ms |
| ✔️ | directory path with ".js" | 11ms |
Resolve config path .ts
| Result | Test | Time |
|---|---|---|
| ✔️ | file path with ".ts" | 2ms |
| ✔️ | directory path with ".ts" | 3ms |
Resolve config path .mjs
| Result | Test | Time |
|---|---|---|
| ✔️ | file path with ".mjs" | 1ms |
| ✔️ | directory path with ".mjs" | 7ms |
Resolve config path .cjs
| Result | Test | Time |
|---|---|---|
| ✔️ | file path with ".cjs" | 2ms |
| ✔️ | directory path with ".cjs" | 2ms |
Resolve config path .json
| Result | Test | Time |
|---|---|---|
| ✔️ | file path with ".json" | 1ms |
| ✔️ | directory path with ".json" | 3ms |
packages/jest-reporters/src/tests/VerboseReporter.test.js ✔️
groupTestsBySuites
| Result | Test | Time |
|---|---|---|
| ✔️ | should handle empty results | 293ms |
| ✔️ | should group A1 in A | 1ms |
| ✔️ | should group A1 in A; B1 in B | 0ms |
| ✔️ | should group A1, A2 in A | 0ms |
| ✔️ | should group A1, A2 in A; B1, B2 in B | 1ms |
| ✔️ | should group AB1 in AB | 0ms |
| ✔️ | should group AB1, AB2 in AB | 0ms |
| ✔️ | should group A1 in A; AB1 in AB | 0ms |
| ✔️ | should group AB1 in AB; A1 in A | 0ms |
| ✔️ | should group AB1 in AB; CD1 in CD | 1ms |
| ✔️ | should group ABC1 in ABC; BC1 in BC; D1 in D; A1 in A | 0ms |
packages/jest-snapshot/src/tests/utils.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | keyToTestName() | 18ms |
| ✔️ | testNameToKey | 0ms |
| ✔️ | saveSnapshotFile() works with | 7ms |
| ✔️ | saveSnapshotFile() works with | 0ms |
| ✔️ | getSnapshotData() throws when no snapshot version | 1ms |
| ✔️ | getSnapshotData() throws for older snapshot version | 1ms |
| ✔️ | getSnapshotData() throws for newer snapshot version | 1ms |
| ✔️ | getSnapshotData() does not throw for when updating | 0ms |
| ✔️ | getSnapshotData() marks invalid snapshot dirty when updating | 0ms |
| ✔️ | getSnapshotData() marks valid snapshot not dirty when updating | 0ms |
| ✔️ | escaping | 0ms |
| ✔️ | serialize handles \r\n | 1ms |
ExtraLineBreaks
| Result | Test | Time |
|---|---|---|
| ✔️ | 0 empty string | 0ms |
| ✔️ | 1 line has double quote marks at edges | 0ms |
| ✔️ | 1 line has spaces at edges | 1ms |
| ✔️ | 2 lines both are blank | 0ms |
| ✔️ | 2 lines have double quote marks at edges | 0ms |
| ✔️ | 2 lines first is blank | 4ms |
| ✔️ | 2 lines last is blank | 1ms |
removeLinesBeforeExternalMatcherTrap
| Result | Test | Time |
|---|---|---|
| ✔️ | contains external matcher trap | 0ms |
| ✔️ | doesn't contain external matcher trap | 0ms |
DeepMerge with property matchers
| Result | Test | Time |
|---|---|---|
| ✔️ | Correctly merges a nested object | 1ms |
| ✔️ | Correctly merges an object with an array of objects | 1ms |
| ✔️ | Correctly merges an object with an array of strings | 0ms |
| ✔️ | Correctly merges an array of objects | 1ms |
| ✔️ | Correctly merges an array of arrays | 0ms |
packages/jest-reporters/src/tests/NotifyReporter.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | test always | 2ms |
| ✔️ | test success | 8ms |
| ✔️ | test change | 1ms |
| ✔️ | test success-change | 0ms |
| ✔️ | test failure-change | 0ms |
| ✔️ | test always with rootDir | 1ms |
| ✔️ | test success with rootDir | 0ms |
| ✔️ | test change with rootDir | 0ms |
| ✔️ | test success-change with rootDir | 1ms |
| ✔️ | test failure-change with rootDir | 1ms |
| ✔️ | test always with moduleName | 0ms |
| ✔️ | test success with moduleName | 0ms |
| ✔️ | test change with moduleName | 1ms |
| ✔️ | test success-change with moduleName | 4ms |
| ✔️ | test failure-change with moduleName | 1ms |
node-notifier is an optional dependency
| Result | Test | Time |
|---|---|---|
| ✔️ | without node-notifier uses mock function that throws an error | 23ms |
| ✔️ | throws the error when require throws an unexpected error | 0ms |
| ✔️ | uses node-notifier when it is available | 1ms |
packages/jest-repl/src/tests/runtime_cli.test.js ✔️
Runtime CLI
| Result | Test | Time |
|---|---|---|
| ✔️ | fails with no path | 80ms |
| ✔️ | displays script output | 1197ms |
| ✔️ | always disables automocking | 1424ms |
| ✔️ | throws script errors | 1209ms |
packages/expect/src/tests/extend.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | is available globally when matcher is unary | 1ms |
| ✔️ | is available globally when matcher is variadic | 1ms |
| ✔️ | exposes matcherUtils in context | 0ms |
| ✔️ | is ok if there is no message specified | 2ms |
| ✔️ | exposes an equality function to custom matchers | 0ms |
| ✔️ | defines asymmetric unary matchers | 3ms |
| ✔️ | defines asymmetric unary matchers that can be prefixed by not | 2ms |
| ✔️ | defines asymmetric variadic matchers | 0ms |
| ✔️ | defines asymmetric variadic matchers that can be prefixed by not | 0ms |
| ✔️ | prints the Symbol into the error message | 1ms |
packages/jest-source-map/src/tests/getCallsite.test.ts ✔️
getCallsite
| Result | Test | Time |
|---|---|---|
| ✔️ | without source map | 1ms |
| ✔️ | ignores errors when fs throws | 1ms |
| ✔️ | reads source map file to determine line and column | 0ms |
packages/jest-config/src/tests/setFromArgv.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | maps special values to valid options | 0ms |
| ✔️ | maps regular values to themselves | 0ms |
| ✔️ | works with string objects | 0ms |
| ✔️ | explicit flags override those from --config | 0ms |
packages/jest-watcher/src/lib/tests/prompt.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | calls handler on change value | 2ms |
| ✔️ | calls handler on success prompt | 0ms |
| ✔️ | calls handler on cancel prompt | 1ms |
packages/jest-docblock/src/tests/index.test.ts ✔️
docblock
| Result | Test | Time |
|---|---|---|
| ✔️ | extracts valid docblock with line comment | 0ms |
| ✔️ | extracts valid docblock | 1ms |
| ✔️ | extracts valid docblock with more comments | 0ms |
| ✔️ | extracts from invalid docblock | 0ms |
| ✔️ | returns extract and parsedocblock | 1ms |
| ✔️ | parses directives out of a docblock | 0ms |
| ✔️ | parses multiple of the same directives out of a docblock | 1ms |
| ✔️ | parses >=3 of the same directives out of a docblock | 0ms |
| ✔️ | parses directives out of a docblock with comments | 0ms |
| ✔️ | parses directives out of a docblock with line comments | 0ms |
| ✔️ | parses multiline directives | 0ms |
| ✔️ | parses multiline directives even if there are linecomments within the docblock | 1ms |
| ✔️ | supports slashes in @team directive | 0ms |
| ✔️ | extracts comments from docblock | 0ms |
| ✔️ | extracts multiline comments from docblock | 10ms |
| ✔️ | preserves leading whitespace in multiline comments from docblock | 0ms |
| ✔️ | removes leading newlines in multiline comments from docblock | 0ms |
| ✔️ | extracts comments from beginning and end of docblock | 0ms |
| ✔️ | preserve urls within a pragma's values | 0ms |
| ✔️ | strip linecomments from pragmas but preserve for comments | 0ms |
| ✔️ | extracts docblock comments as CRLF when docblock contains CRLF | 0ms |
| ✔️ | extracts docblock comments as LF when docblock contains LF | 0ms |
| ✔️ | strips the docblock out of a file that contains a top docblock | 0ms |
| ✔️ | returns a file unchanged if there is no top docblock to strip | 0ms |
| ✔️ | prints docblocks with no pragmas as empty string | 0ms |
| ✔️ | prints docblocks with one pragma on one line | 0ms |
| ✔️ | prints docblocks with multiple pragmas on multiple lines | 1ms |
| ✔️ | prints docblocks with multiple of the same pragma | 0ms |
| ✔️ | prints docblocks with pragmas | 1ms |
| ✔️ | prints docblocks with comments | 0ms |
| ✔️ | prints docblocks with comments and no keys | 0ms |
| ✔️ | prints docblocks with multiline comments | 0ms |
| ✔️ | prints docblocks that are parseable | 0ms |
| ✔️ | can augment existing docblocks with comments | 0ms |
| ✔️ | prints docblocks using CRLF if comments contains CRLF | 0ms |
| ✔️ | prints docblocks using LF if comments contains LF | 1ms |
packages/jest-snapshot/src/tests/dedentLines.test.ts ✔️
dedentLines non-null
| Result | Test | Time |
|---|---|---|
| ✔️ | no lines | 3ms |
| ✔️ | one line empty string | 1ms |
| ✔️ | one line empty object | 0ms |
| ✔️ | one line self-closing element | 0ms |
| ✔️ | object value empty string | 0ms |
| ✔️ | object value string includes double-quote marks | 0ms |
| ✔️ | markup with props and text | 0ms |
| ✔️ | markup with components as props | 1ms |
dedentLines null
| Result | Test | Time |
|---|---|---|
| ✔️ | object key multi-line | 0ms |
| ✔️ | object value multi-line | 1ms |
| ✔️ | object key and value multi-line | 0ms |
| ✔️ | markup prop multi-line | 0ms |
| ✔️ | markup prop component with multi-line text | 1ms |
| ✔️ | markup text multi-line | 0ms |
| ✔️ | markup text multiple lines | 0ms |
| ✔️ | markup unclosed self-closing start tag | 1ms |
| ✔️ | markup unclosed because no end tag | 0ms |
packages/jest-config/src/tests/getMaxWorkers.test.ts ✔️
getMaxWorkers
| Result | Test | Time |
|---|---|---|
| ✔️ | Returns 1 when runInBand | 0ms |
| ✔️ | Returns 1 when the OS CPUs are not available | 0ms |
| ✔️ | Returns the maxWorkers when specified |
0ms |
| ✔️ | Returns based on the number of cpus | 1ms |
getMaxWorkers % based
| Result | Test | Time |
|---|---|---|
| ✔️ | 50% = 2 workers | 0ms |
| ✔️ | < 0 workers should become 1 | 1ms |
| ✔️ | 0% shouldn't break | 0ms |
packages/jest-reporters/src/tests/utils.test.ts ✔️
wrapAnsiString()
| Result | Test | Time |
|---|---|---|
| ✔️ | wraps a long string containing ansi chars | 3ms |
| ✔️ | returns the string unaltered if given a terminal width of zero | 0ms |
trimAndFormatPath()
| Result | Test | Time |
|---|---|---|
| ✔️ | trims dirname | 1ms |
| ✔️ | trims dirname (longer line width) | 1ms |
| ✔️ | trims dirname and basename | 0ms |
| ✔️ | does not trim anything | 0ms |
| ✔️ | split at the path.sep index | 1ms |
printDisplayName
| Result | Test | Time |
|---|---|---|
| ✔️ | should default displayName color to white when displayName is a string | 0ms |
| ✔️ | should default displayName color to white when color is not a valid value | 1ms |
| ✔️ | should correctly print the displayName when color and name are valid values | 0ms |
packages/jest-snapshot/src/tests/throwMatcher.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | throw matcher can take func | 2ms |
throw matcher from promise
| Result | Test | Time |
|---|---|---|
| ✔️ | can take error | 0ms |
| ✔️ | can take custom error | 1ms |
packages/jest-snapshot/src/tests/matcher.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | matcher returns matcher name, expected and actual values | 7ms |
packages/jest-config/src/tests/validatePattern.test.ts ✔️
validate pattern function
| Result | Test | Time |
|---|---|---|
| ✔️ | without passed args returns true | 1ms |
| ✔️ | returns true for empty pattern | 0ms |
| ✔️ | returns true for valid pattern | 0ms |
| ✔️ | returns false for invalid pattern | 1ms |
packages/jest-resolve/src/tests/isBuiltinModule.test.ts ✔️
isBuiltinModule
| Result | Test | Time |
|---|---|---|
| ✔️ | should return true for the path module |
0ms |
| ✔️ | should return false for the chalk module |
0ms |
| ✔️ | should return true for the _http_common module |
0ms |
| ✔️ | should return false for any internal node builtins | 0ms |
packages/jest-globals/src/tests/index.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | throw when directly imported | 505ms |
packages/jest-regex-util/src/tests/index.test.ts ✔️
replacePathSepForRegex() posix
| Result | Test | Time |
|---|---|---|
| ✔️ | should return the path | 1ms |
replacePathSepForRegex() win32
| Result | Test | Time |
|---|---|---|
| ✔️ | should replace POSIX path separators | 1ms |
| ✔️ | should escape Windows path separators | 0ms |
| ✔️ | should not escape an escaped dot | 1ms |
| ✔️ | should not escape an escaped regexp symbol | 0ms |
| ✔️ | should escape Windows path separators inside groups | 0ms |
| ✔️ | should escape Windows path separator at the beginning | 1ms |
| ✔️ | should not escape several already escaped path separators | 0ms |
packages/jest-snapshot/src/tests/mockSerializer.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | mock with 0 calls and default name | 1ms |
| ✔️ | mock with 2 calls, 1 return, 1 throw | 1ms |
| ✔️ | mock with 0 calls and default name in React element | 0ms |
| ✔️ | mock with 0 calls and non-default name | 0ms |
| ✔️ | mock with 1 calls and non-default name via new in object | 1ms |
| ✔️ | mock with 1 calls in React element | 0ms |
| ✔️ | mock with 2 calls | 1ms |
| ✔️ | indent option | 0ms |
| ✔️ | min option | 1ms |
| ✔️ | maxDepth option | 0ms |
packages/jest-reporters/src/tests/getWatermarks.test.ts ✔️
getWatermarks
| Result | Test | Time |
|---|---|---|
| ✔️ | that watermarks use thresholds as upper target | 1ms |
| ✔️ | that watermarks are created always created | 1ms |
packages/jest-reporters/src/tests/DefaultReporter.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | normal output, everything goes to stdout | 3ms |
| ✔️ | when using stderr as output, no stdout call is made | 1ms |
packages/jest-reporters/src/tests/getResultHeader.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should call terminal-link correctly |
0ms |
| ✔️ | should render the terminal link | 0ms |
| ✔️ | should display test time for slow test | 0ms |
| ✔️ | should not display test time for fast test | 0ms |
packages/expect/src/tests/toEqual-dom.test.ts ✔️
toEqual duck type Text
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 0ms |
| ✔️ | isNot true | 0ms |
toEqual duck type Element
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 0ms |
toEqual duck type Fragment
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 0ms |
toEqual document createTextNode
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 1ms |
toEqual document createElement
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 1ms |
| ✔️ | isNot true | 0ms |
toEqual document createDocumentFragment
| Result | Test | Time |
|---|---|---|
| ✔️ | isNot false | 2ms |
| ✔️ | isNot true | 1ms |
packages/jest-environment-node/src/tests/node_environment.test.ts ✔️
NodeEnvironment
| Result | Test | Time |
|---|---|---|
| ✔️ | uses a copy of the process object | 11ms |
| ✔️ | exposes process.on | 1ms |
| ✔️ | exposes global.global | 1ms |
| ✔️ | should configure setTimeout/setInterval to use the node api | 3ms |
| ✔️ | has modern fake timers implementation | 1ms |
| ✔️ | TextEncoder references the same global Uint8Array constructor | 0ms |
packages/jest-reporters/src/tests/getSnapshotStatus.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Retrieves the snapshot status | 0ms |
| ✔️ | Shows no snapshot updates if all snapshots matched | 1ms |
| ✔️ | Retrieves the snapshot status after a snapshot update | 0ms |
packages/jest-validate/src/tests/validateCLIOptions.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | validates yargs special options | 1ms |
| ✔️ | validates testURL | 1ms |
| ✔️ | fails for unknown option | 4ms |
| ✔️ | fails for multiple unknown options | 0ms |
| ✔️ | does not show suggestion when unrecognized cli param length <= 1 | 1ms |
| ✔️ | shows suggestion when unrecognized cli param length > 1 | 0ms |
packages/jest-reporters/src/tests/getSnapshotSummary.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | creates a snapshot summary | 0ms |
| ✔️ | creates a snapshot summary after an update | 0ms |
| ✔️ | creates a snapshot summary with multiple snapshot being written/updated | 0ms |
| ✔️ | returns nothing if there are no updates | 1ms |
packages/jest-watcher/src/lib/tests/formatTestNameByPattern.test.ts ✔️
for multiline test name returns
| Result | Test | Time |
|---|---|---|
| ✔️ | test name with highlighted pattern and replaced line breaks | 2ms |
for one line test name with pattern in the head returns
| Result | Test | Time |
|---|---|---|
| ✔️ | test name with highlighted pattern | 0ms |
| ✔️ | test name with cutted tail and highlighted pattern | 0ms |
| ✔️ | test name with cutted tail and cutted highlighted pattern | 0ms |
for one line test name pattern in the middle
| Result | Test | Time |
|---|---|---|
| ✔️ | test name with highlighted pattern returns | 1ms |
| ✔️ | test name with cutted tail and highlighted pattern | 0ms |
| ✔️ | test name with cutted tail and cutted highlighted pattern | 0ms |
| ✔️ | test name with highlighted cutted | 0ms |
for one line test name pattern in the tail returns
| Result | Test | Time |
|---|---|---|
| ✔️ | test name with highlighted pattern | 1ms |
| ✔️ | test name with cutted tail and cutted highlighted pattern | 0ms |
| ✔️ | test name with highlighted cutted | 1ms |
packages/jest-transform/src/tests/shouldInstrument.test.ts ✔️
shouldInstrument should return true
| Result | Test | Time |
|---|---|---|
| ✔️ | when testRegex is provided and file is not a test file | 5ms |
| ✔️ | when more than one testRegex is provided and filename is not a test file | 0ms |
| ✔️ | when testMatch is provided and file is not a test file | 3ms |
| ✔️ | when testPathIgnorePatterns is provided and file is not a test file | 1ms |
| ✔️ | when more than one testPathIgnorePatterns is provided and filename is not a test file | 0ms |
| ✔️ | when testRegex and testPathIgnorePatterns are provided and file is not a test file | 1ms |
| ✔️ | when testMatch and testPathIgnorePatterns are provided and file is not a test file | 0ms |
| ✔️ | should return true when file is in collectCoverageOnlyFrom when provided | 32ms |
| ✔️ | should return true when filename matches collectCoverageFrom | 0ms |
| ✔️ | should return true if the file is not in coveragePathIgnorePatterns | 0ms |
| ✔️ | should return true if file is a testfile but forceCoverageMatch is set | 1ms |
shouldInstrument should return false
| Result | Test | Time |
|---|---|---|
| ✔️ | if collectCoverage is falsy | 11ms |
| ✔️ | when testRegex is provided and filename is a test file | 0ms |
| ✔️ | when more than one testRegex is provided and filename matches one of the patterns | 0ms |
| ✔️ | when testMatch is provided and file is a test file | 0ms |
| ✔️ | when testRegex and testPathIgnorePatterns are provided and filename is a test file | 1ms |
| ✔️ | when testMatch and testPathIgnorePatterns are provided and file is a test file | 0ms |
| ✔️ | when file is not in collectCoverageOnlyFrom when provided | 0ms |
| ✔️ | when filename does not match collectCoverageFrom | 0ms |
| ✔️ | if the file is in coveragePathIgnorePatterns | 0ms |
| ✔️ | if file is in mock patterns | 1ms |
| ✔️ | if file is a globalSetup file | 0ms |
| ✔️ | if file is globalTeardown file | 0ms |
| ✔️ | if file is in setupFiles | 11ms |
| ✔️ | if file is in setupFilesAfterEnv | 0ms |
packages/jest-transform/src/tests/ScriptTransformer.test.ts ✔️
ScriptTransformer
| Result | Test | Time |
|---|---|---|
| ✔️ | transforms a file properly | 204ms |
| ✔️ | does not transform Node core modules | 51ms |
| ✔️ | throws an error if process doesn't return a string or an objectcontaining code key with processed string |
79ms |
| ✔️ | throws an error if process doesn't defined |
42ms |
| ✔️ | throws an error if createTransformer returns object without process method |
98ms |
| ✔️ | shouldn't throw error without process method. But with corrent createTransformer method | 66ms |
| ✔️ | uses the supplied preprocessor | 45ms |
| ✔️ | uses multiple preprocessors | 35ms |
| ✔️ | writes source map if preprocessor supplies it | 26ms |
| ✔️ | writes source map if preprocessor inlines it | 38ms |
| ✔️ | warns of unparseable inlined source maps from the preprocessor | 67ms |
| ✔️ | writes source maps if given by the transformer | 32ms |
| ✔️ | does not write source map if not given by the transformer | 75ms |
| ✔️ | should write a source map for the instrumented file when transformed | 66ms |
| ✔️ | should write a source map for the instrumented file when not transformed | 66ms |
| ✔️ | passes expected transform options to getCacheKey | 73ms |
| ✔️ | creates transformer with config | 35ms |
| ✔️ | reads values from the cache | 93ms |
| ✔️ | reads values from the cache when the file contains colons | 84ms |
| ✔️ | should reuse the value from in-memory cache which is set by custom transformer | 25ms |
| ✔️ | does not reuse the in-memory cache between different projects | 37ms |
| ✔️ | preload transformer when using preloadTransformer |
36ms |
packages/jest-circus/src/tests/baseTest.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | simple test | 2145ms |
| ✔️ | failures | 707ms |
packages/jest-mock/src/tests/index.test.ts ✔️
moduleMocker getMetadata
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the function name property |
2ms |
| ✔️ | mocks constant values | 1ms |
| ✔️ | does not retrieve metadata for arrays | 1ms |
| ✔️ | does not retrieve metadata for undefined | 1ms |
| ✔️ | does not retrieve metadata for null | 1ms |
| ✔️ | retrieves metadata for ES6 classes | 1ms |
| ✔️ | retrieves synchronous function metadata | 1ms |
| ✔️ | retrieves asynchronous function metadata | 1ms |
| ✔️ | retrieves metadata for object literals and it's members | 1ms |
| ✔️ | retrieves Date object metadata | 5ms |
moduleMocker generateFromMetadata
| Result | Test | Time |
|---|---|---|
| ✔️ | forwards the function name property | 1ms |
| ✔️ | fixes illegal function name properties | 1ms |
| ✔️ | special cases the mockConstructor name | 0ms |
| ✔️ | wont interfere with previous mocks on a shared prototype | 2ms |
| ✔️ | does not mock non-enumerable getters | 1ms |
| ✔️ | mocks getters of ES modules | 0ms |
| ✔️ | mocks ES2015 non-enumerable methods | 1ms |
| ✔️ | mocks ES2015 non-enumerable static properties and methods | 1ms |
| ✔️ | mocks methods in all the prototype chain (null prototype) | 1ms |
| ✔️ | does not mock methods from Object.prototype | 1ms |
| ✔️ | does not mock methods from Object.prototype (in mock context) | 1ms |
| ✔️ | does not mock methods from Function.prototype | 1ms |
| ✔️ | does not mock methods from Function.prototype (in mock context) | 1ms |
| ✔️ | does not mock methods from RegExp.prototype | 1ms |
| ✔️ | does not mock methods from RegExp.prototype (in mock context) | 1ms |
| ✔️ | mocks methods that are bound multiple times | 0ms |
| ✔️ | mocks methods that are bound after mocking | 0ms |
| ✔️ | mocks regexp instances | 1ms |
| ✔️ | mocks functions with numeric names | 1ms |
| ✔️ | mocks the method in the passed object itself | 0ms |
| ✔️ | should delete previously inexistent methods when restoring | 0ms |
| ✔️ | supports mock value returning undefined | 1ms |
| ✔️ | supports mock value once returning undefined | 1ms |
| ✔️ | mockReturnValueOnce mocks value just once | 1ms |
| ✔️ | supports mocking resolvable async functions | 0ms |
| ✔️ | supports mocking resolvable async functions only once | 0ms |
| ✔️ | supports mocking rejectable async functions | 0ms |
| ✔️ | supports mocking rejectable async functions only once | 1ms |
| ✔️ | tracks thrown errors without interfering with other tracking | 33ms |
| ✔️ | a call that throws undefined is tracked properly | 0ms |
| ✔️ | results of recursive calls are tracked properly | 1ms |
| ✔️ | test results of recursive calls from within the recursive call | 1ms |
| ✔️ | call mockClear inside recursive mock | 1ms |
moduleMocker generateFromMetadata mocked functions
| Result | Test | Time |
|---|---|---|
| ✔️ | tracks calls to mocks | 1ms |
| ✔️ | tracks instances made by mocks | 1ms |
| ✔️ | supports clearing mock calls | 1ms |
| ✔️ | supports clearing mocks | 7ms |
| ✔️ | supports clearing all mocks | 1ms |
| ✔️ | supports resetting mock return values | 1ms |
| ✔️ | supports resetting single use mock return values | 1ms |
| ✔️ | supports resetting mock implementations | 0ms |
| ✔️ | supports resetting single use mock implementations | 0ms |
| ✔️ | supports resetting all mocks | 2ms |
| ✔️ | maintains function arity | 0ms |
moduleMocker generateFromMetadata return values
| Result | Test | Time |
|---|---|---|
| ✔️ | tracks return values | 1ms |
| ✔️ | tracks mocked return values | 1ms |
| ✔️ | supports resetting return values | 1ms |
moduleMocker generateFromMetadata invocationCallOrder
| Result | Test | Time |
|---|---|---|
| ✔️ | tracks invocationCallOrder made by mocks | 1ms |
| ✔️ | supports clearing mock invocationCallOrder | 1ms |
| ✔️ | supports clearing all mocks invocationCallOrder | 1ms |
| ✔️ | handles a property called prototype |
1ms |
moduleMocker getMockImplementation
| Result | Test | Time |
|---|---|---|
| ✔️ | should mock calls to a mock function | 1ms |
moduleMocker mockImplementationOnce
| Result | Test | Time |
|---|---|---|
| ✔️ | should mock constructor | 1ms |
| ✔️ | should mock single call to a mock function | 1ms |
| ✔️ | should fallback to default mock function when no specific mock is available | 1ms |
moduleMocker
| Result | Test | Time |
|---|---|---|
| ✔️ | mockReturnValue does not override mockImplementationOnce | 1ms |
| ✔️ | mockImplementation resets the mock | 1ms |
| ✔️ | should recognize a mocked function | 0ms |
| ✔️ | default mockName is jest.fn() | 0ms |
| ✔️ | mockName sets the mock name | 1ms |
| ✔️ | mockName gets reset by mockReset | 1ms |
| ✔️ | mockName gets reset by mockRestore | 1ms |
| ✔️ | mockName is not reset by mockClear | 1ms |
moduleMocker spyOn
| Result | Test | Time |
|---|---|---|
| ✔️ | should work | 1ms |
| ✔️ | should throw on invalid input | 28ms |
| ✔️ | supports restoring all spies | 2ms |
| ✔️ | should work with getters | 1ms |
moduleMocker spyOnProperty
| Result | Test | Time |
|---|---|---|
| ✔️ | should work - getter | 2ms |
| ✔️ | should work - setter | 1ms |
| ✔️ | should throw on invalid input | 1ms |
| ✔️ | supports restoring all spies | 1ms |
| ✔️ | should work with getters on the prototype chain | 1ms |
| ✔️ | should work with setters on the prototype chain | 1ms |
| ✔️ | supports restoring all spies on the prototype chain | 1ms |
packages/jest-circus/src/tests/hooks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | beforeEach is executed before each test in current/child describe blocks | 2304ms |
| ✔️ | multiple before each hooks in one describe are executed in the right order | 678ms |
| ✔️ | beforeAll is exectued correctly | 625ms |
packages/jest-runtime/src/tests/runtime_require_module.test.js ✔️
Runtime requireModule
| Result | Test | Time |
|---|---|---|
| ✔️ | finds haste modules | 1124ms |
| ✔️ | provides module to modules |
26ms |
| ✔️ | provides module.parent to modules |
80ms |
| ✔️ | module.parent should be undefined for entrypoints |
25ms |
| ✔️ | resolve module.parent.require correctly | 49ms |
| ✔️ | resolve module.parent.filename correctly | 23ms |
| ✔️ | provides module.loaded to modules |
27ms |
| ✔️ | provides module.filename to modules |
36ms |
| ✔️ | provides module.paths to modules |
49ms |
| ✔️ | provides require.main to modules |
52ms |
| ✔️ | throws on non-existent haste modules | 68ms |
| ✔️ | finds relative-path modules without file extension | 46ms |
| ✔️ | finds relative-path modules with file extension | 21ms |
| ✔️ | throws on non-existent relative-path modules | 22ms |
| ✔️ | finds node core built-in modules | 48ms |
| ✔️ | finds and loads JSON files without file extension | 27ms |
| ✔️ | finds and loads JSON files with file extension | 29ms |
| ✔️ | requires a JSON file twice successfully | 34ms |
| ✔️ | provides manual mock when real module doesnt exist | 27ms |
| ✔️ | doesn't override real modules with manual mocks when explicitly unmocked | 166ms |
| ✔️ | resolves haste packages properly | 30ms |
| ✔️ | resolves platform extensions based on the default platform | 204ms |
| ✔️ | finds modules encoded in UTF-8 with BOM | 25ms |
| ✔️ | finds and loads JSON files encoded in UTF-8 with BOM | 21ms |
| ✔️ | should export a constructable Module class | 21ms |
| ✔️ | caches Module correctly | 23ms |
Runtime requireModule on node >=12.12.0
| Result | Test | Time |
|---|---|---|
| ✔️ | overrides module.createRequire | 28ms |
packages/jest-runtime/src/tests/runtime_mock.test.js ✔️
Runtime jest.mock
| Result | Test | Time |
|---|---|---|
| ✔️ | uses explicitly set mocks instead of automocking | 635ms |
| ✔️ | sets virtual mock for non-existing module required from same directory | 29ms |
| ✔️ | sets virtual mock for non-existing module required from different directory | 18ms |
Runtime jest.setMock
| Result | Test | Time |
|---|---|---|
| ✔️ | uses explicitly set mocks instead of automocking | 21ms |
packages/jest-circus/src/tests/circusItTestError.test.ts ✔️
test/it error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | it doesn't throw an error with valid arguments | 1ms |
| ✔️ | it throws error with missing callback function | 28ms |
| ✔️ | it throws an error when first argument isn't a string | 1ms |
| ✔️ | it throws an error when callback function is not a function | 0ms |
| ✔️ | test doesn't throw an error with valid arguments | 0ms |
| ✔️ | test throws error with missing callback function | 1ms |
| ✔️ | test throws an error when first argument isn't a string | 0ms |
| ✔️ | test throws an error when callback function is not a function | 1ms |
packages/jest-worker/src/base/tests/BaseWorkerPool.test.js ✔️
BaseWorkerPool
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when createWorker is not defined | 15ms |
| ✔️ | creates and exposes n workers | 9ms |
| ✔️ | creates and expoeses n workers | 1ms |
| ✔️ | creates workers with the right options | 2ms |
| ✔️ | makes a non-existing relative worker throw | 3ms |
| ✔️ | create multiple workers with unique worker ids | 1ms |
| ✔️ | aggregates all stdouts and stderrs from all workers | 1ms |
| ✔️ | works when stdout and stderr are not piped to the parent | 1ms |
BaseWorkerPool end
| Result | Test | Time |
|---|---|---|
| ✔️ | ends all workers | 1ms |
| ✔️ | resolves with forceExited=false if workers exited gracefully | 1ms |
| ✔️ | force exits workers that do not exit gracefully and resolves with forceExited=true | 501ms |
packages/pretty-format/src/tests/Immutable.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not incorrectly match identity-obj-proxy as Immutable object | 1ms |
Immutable.OrderedSet
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty collection {min: true} | 1ms |
| ✔️ | supports an empty collection {min: false} | 0ms |
| ✔️ | supports a single string element | 1ms |
| ✔️ | supports a single integer element | 0ms |
| ✔️ | supports multiple string elements {min: true} | 1ms |
| ✔️ | supports multiple string elements {min: false} | 0ms |
| ✔️ | supports multiple integer elements {min: true} | 0ms |
| ✔️ | supports multiple integer elements {min: false} | 1ms |
| ✔️ | supports object elements {min: true} | 0ms |
| ✔️ | supports object elements {min: false} | 0ms |
| ✔️ | supports React elements {min: true} | 1ms |
| ✔️ | supports React elements {min: false} | 1ms |
Immutable.List
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty collection {min: true} | 0ms |
| ✔️ | supports an empty collection {min: false} | 0ms |
| ✔️ | supports a single string element | 0ms |
| ✔️ | supports a single integer element | 1ms |
| ✔️ | supports multiple string elements {min: true} | 0ms |
| ✔️ | supports multiple string elements {min: false} | 0ms |
| ✔️ | supports multiple integer elements {min: true} | 0ms |
| ✔️ | supports multiple integer elements {min: false} | 1ms |
| ✔️ | supports object elements {min: true} | 0ms |
| ✔️ | supports object elements {min: false} | 0ms |
| ✔️ | supports React elements {min: true} | 0ms |
| ✔️ | supports React elements {min: false} | 1ms |
Immutable.Stack
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty collection {min: true} | 0ms |
| ✔️ | supports an empty collection {min: false} | 0ms |
| ✔️ | supports a single string element | 1ms |
| ✔️ | supports a single integer element | 0ms |
| ✔️ | supports multiple string elements {min: true} | 0ms |
| ✔️ | supports multiple string elements {min: false} | 0ms |
| ✔️ | supports multiple integer elements {min: true} | 1ms |
| ✔️ | supports multiple integer elements {min: false} | 0ms |
| ✔️ | supports object elements {min: true} | 0ms |
| ✔️ | supports object elements {min: false} | 0ms |
| ✔️ | supports React elements {min: true} | 1ms |
| ✔️ | supports React elements {min: false} | 0ms |
Immutable.Set
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty collection {min: true} | 0ms |
| ✔️ | supports an empty collection {min: false} | 1ms |
| ✔️ | supports a single string element | 0ms |
| ✔️ | supports a single integer element | 0ms |
| ✔️ | supports multiple string elements {min: true} | 0ms |
| ✔️ | supports multiple string elements {min: false} | 1ms |
| ✔️ | supports multiple integer elements {min: true} | 0ms |
| ✔️ | supports multiple integer elements {min: false} | 1ms |
| ✔️ | supports object elements {min: true} | 0ms |
| ✔️ | supports object elements {min: false} | 0ms |
| ✔️ | supports React elements {min: true} | 0ms |
| ✔️ | supports React elements {min: false} | 1ms |
Immutable.Map
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty collection {min: true} | 0ms |
| ✔️ | supports an empty collection {min: false} | 0ms |
| ✔️ | supports an object with single key | 0ms |
| ✔️ | supports an object with multiple keys {min: true} | 1ms |
| ✔️ | supports an object with multiple keys {min: false} | 0ms |
| ✔️ | supports object elements {min: true} | 0ms |
| ✔️ | supports object elements {min: false} | 0ms |
| ✔️ | supports React elements {min: true} | 0ms |
| ✔️ | supports React elements {min: false} | 0ms |
Immutable.OrderedMap
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty collection {min: true} | 0ms |
| ✔️ | supports an empty collection {min: false} | 0ms |
| ✔️ | supports an object with single key | 1ms |
| ✔️ | supports an object with multiple keys {min: true} | 0ms |
| ✔️ | supports an object with multiple keys {min: false} | 0ms |
| ✔️ | supports object elements {min: true} | 0ms |
| ✔️ | supports object elements {min: false} | 1ms |
| ✔️ | supports React elements {min: true} | 0ms |
| ✔️ | supports React elements {min: false} | 0ms |
| ✔️ | supports non-string keys | 2ms |
Immutable.Record
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty record {min: true} | 0ms |
| ✔️ | supports an empty record {min: false} | 0ms |
| ✔️ | supports a record with descriptive name | 0ms |
| ✔️ | supports a record without descriptive name | 0ms |
| ✔️ | supports a record with values {min: true} | 0ms |
| ✔️ | supports a record with values {min: false} | 1ms |
| ✔️ | supports a record with Map value {min: true} | 0ms |
| ✔️ | supports a record with Map value {min: false} | 0ms |
| ✔️ | supports imbricated Record {min: true} | 0ms |
| ✔️ | supports imbricated Record {min: false} | 0ms |
indentation of heterogeneous collections
| Result | Test | Time |
|---|---|---|
| ✔️ | empty Immutable.List as child of Object | 0ms |
| ✔️ | empty Immutable.Map as child of Array | 0ms |
| ✔️ | non-empty Array as child of Immutable.Map | 0ms |
| ✔️ | non-empty Object as child of Immutable.List | 0ms |
indent option
| Result | Test | Time |
|---|---|---|
| ✔️ | default implicit: 2 spaces | 0ms |
| ✔️ | default explicit: 2 spaces | 0ms |
| ✔️ | non-default: 0 spaces | 0ms |
| ✔️ | non-default: 4 spaces | 0ms |
maxDepth option
| Result | Test | Time |
|---|---|---|
| ✔️ | Immutable.List as child of Object | 0ms |
| ✔️ | Immutable.Map as child of Array | 0ms |
| ✔️ | Immutable.Seq as child of Immutable.Map | 1ms |
| ✔️ | Immutable.Map as descendants in immutable collection | 0ms |
Immutable.Seq
| Result | Test | Time |
|---|---|---|
| ✔️ | supports an empty sequence from array {min: true} | 0ms |
| ✔️ | supports an empty sequence from array {min: false} | 1ms |
| ✔️ | supports a non-empty sequence from array {min: true} | 0ms |
| ✔️ | supports a non-empty sequence from array {min: false} | 0ms |
| ✔️ | supports a non-empty sequence from arguments | 0ms |
| ✔️ | supports an empty sequence from object {min: true} | 0ms |
| ✔️ | supports an empty sequence from object {min: false} | 14ms |
| ✔️ | supports a non-empty sequence from object {min: true} | 0ms |
| ✔️ | supports a non-empty sequence from object {min: false} | 0ms |
| ✔️ | supports a sequence of entries from Immutable.Map | 1ms |
| ✔️ | supports a sequence of values from ECMAScript Set | 0ms |
| ✔️ | supports a sequence of values from Immutable.List | 0ms |
| ✔️ | supports a sequence of values from Immutable.Set | 1ms |
| ✔️ | supports a sequence of values from Immutable.Stack | 0ms |
Immutable.Seq lazy entries
| Result | Test | Time |
|---|---|---|
| ✔️ | from object properties | 0ms |
| ✔️ | from Immutable.Map entries | 1ms |
Immutable.Seq lazy values
| Result | Test | Time |
|---|---|---|
| ✔️ | from Immutable.Range | 0ms |
| ✔️ | from iterator | 2ms |
| ✔️ | from array items | 0ms |
| ✔️ | from Immutable.List values | 1ms |
| ✔️ | from ECMAScript Set values | 0ms |
packages/jest-runtime/src/tests/Runtime-sourceMaps.test.js ✔️
Runtime requireModule
| Result | Test | Time |
|---|---|---|
| ✔️ | installs source maps if available | 560ms |
packages/jest-environment-jsdom/src/tests/jsdom_environment.test.ts ✔️
JSDomEnvironment
| Result | Test | Time |
|---|---|---|
| ✔️ | should configure setTimeout/setInterval to use the browser api | 47ms |
| ✔️ | has modern fake timers implementation | 19ms |
packages/babel-plugin-jest-hoist/src/tests/hoistPlugin.test.ts ✔️
babel-plugin-jest-hoist
| Result | Test | Time |
|---|---|---|
| ✔️ | automatic react runtime | 102ms |
| ✔️ | top level mocking | 18ms |
| ✔️ | within a block | 10ms |
| ✔️ | within a block with no siblings | 7ms |
packages/jest-worker/src/workers/tests/ChildProcessWorker.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | passes fork options down to child_process.fork, adding the defaults | 26ms |
| ✔️ | passes workerId to the child process and assign it to 1-indexed env.JEST_WORKER_ID | 2ms |
| ✔️ | initializes the child process with the given workerPath | 2ms |
| ✔️ | stops initializing the worker after the amount of retries is exceeded | 25ms |
| ✔️ | provides stdout and stderr from the child processes | 5ms |
| ✔️ | sends the task to the child process | 10ms |
| ✔️ | resends the task to the child process after a retry | 2ms |
| ✔️ | calls the onProcessStart method synchronously if the queue is empty | 2ms |
| ✔️ | can send multiple messages to parent | 3ms |
| ✔️ | creates error instances for known errors | 3ms |
| ✔️ | throws when the child process returns a strange message | 2ms |
| ✔️ | does not restart the child if it cleanly exited | 2ms |
| ✔️ | resolves waitForExit() after the child process cleanly exited | 1ms |
| ✔️ | restarts the child when the child process dies | 13ms |
| ✔️ | sends SIGTERM when forceExit() is called | 1ms |
| ✔️ | sends SIGKILL some time after SIGTERM | 1ms |
| ✔️ | does not send SIGKILL if SIGTERM exited the process | 2ms |
packages/jest-each/src/tests/array.test.ts ✔️
jest-each .test
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 1ms |
| ✔️ | throws an error when called with an empty array | 9ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 4ms |
jest-each .test.concurrent
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 1ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each .test.concurrent.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 1ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 1ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 0ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 1ms |
jest-each .test.concurrent.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 0ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 1ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 0ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 1ms |
| ✔️ | calls global with given timeout | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using sprintf format | 1ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 0ms |
jest-each .test.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 0ms |
| ✔️ | throws an error when called with an empty array | 1ms |
| ✔️ | calls global with given title | 6ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using printf format | 4ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each .it
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 1ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each .fit
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 1ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 1ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each .it.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 0ms |
| ✔️ | throws an error when called with an empty array | 1ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 1ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each .describe
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 0ms |
| ✔️ | throws an error when called with an empty array | 1ms |
| ✔️ | calls global with given title | 3ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 1ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 0ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 1ms |
jest-each .fdescribe
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 0ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 1ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 0ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each .describe.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with an array | 0ms |
| ✔️ | throws an error when called with an empty array | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using printf format | 0ms |
| ✔️ | does not call global test with title containing more param values than sprintf placeholders | 0ms |
| ✔️ | calls global test title with %p placeholder injected at the correct positions | 1ms |
| ✔️ | does not calls global test title with %p placeholder when no data is supplied at given position | 0ms |
| ✔️ | calls global with cb function containing all parameters of each test case when given 1d array | 1ms |
| ✔️ | calls global with cb function containing all parameters of each test case 2d array | 0ms |
| ✔️ | calls global with given timeout | 0ms |
jest-each done callback
| Result | Test | Time |
|---|---|---|
| ✔️ | calls [ 'test' ] with done when cb function has more args than params of given test row | 1ms |
| ✔️ | calls [ 'test', 'only' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'test', 'concurrent' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'test', 'concurrent', 'only' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'it' ] with done when cb function has more args than params of given test row | 1ms |
| ✔️ | calls [ 'fit' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'it', 'only' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | does not call [ 'describe' ] with done when test function has more args than params of given test row | 1ms |
| ✔️ | does not call [ 'fdescribe' ] with done when test function has more args than params of given test row | 2ms |
| ✔️ | does not call [ 'describe', 'only' ] with done when test function has more args than params of given test row | 1ms |
jest-each .xtest
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using sprintf format | 0ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 1ms |
jest-each .test.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 6ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using sprintf format | 0ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 1ms |
jest-each .xit
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using sprintf format | 0ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 1ms |
jest-each .it.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using sprintf format | 0ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 0ms |
jest-each .xdescribe
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using sprintf format | 0ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 1ms |
jest-each .describe.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using sprintf format | 0ms |
| ✔️ | calls global with title with placeholder values correctly interpolated | 0ms |
packages/jest-each/src/tests/template.test.ts ✔️
jest-each .test
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 2ms |
| ✔️ | throws error when there are additional words in second column heading | 0ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 1ms |
| ✔️ | throws error when there are no arguments for given headings | 1ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 2ms |
| ✔️ | throws an error when called with an empty string | 2ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 5ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 1ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 0ms |
| ✔️ | calls global with cb function with object built from table headings and values | 1ms |
| ✔️ | calls global with given timeout | 0ms |
| ✔️ | formats primitive values using .toString() | 1ms |
jest-each .test.concurrent
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 0ms |
| ✔️ | throws error when there are additional words in second column heading | 1ms |
| ✔️ | throws error when there are additional words in last column heading | 1ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 1ms |
| ✔️ | throws error when there are no arguments for given headings | 0ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 33ms |
| ✔️ | throws an error when called with an empty string | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
| ✔️ | calls global with title containing $key in multiple positions | 1ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 1ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 0ms |
| ✔️ | formats primitive values using .toString() | 1ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
jest-each .test.concurrent.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 0ms |
| ✔️ | throws error when there are additional words in second column heading | 1ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 0ms |
| ✔️ | throws error when there are no arguments for given headings | 12ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 1ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 0ms |
| ✔️ | throws an error when called with an empty string | 0ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 1ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 1ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each .test.concurrent.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 0ms |
| ✔️ | throws error when there are additional words in second column heading | 6ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 0ms |
| ✔️ | does not throw error when there is only one column | 1ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 0ms |
| ✔️ | throws error when there are no arguments for given headings | 0ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 0ms |
| ✔️ | throws an error when called with an empty string | 1ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 1ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 0ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 1ms |
| ✔️ | formats primitive values using .toString() | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
jest-each .test.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 0ms |
| ✔️ | throws error when there are additional words in second column heading | 1ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 0ms |
| ✔️ | throws error when there are no arguments for given headings | 1ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 1ms |
| ✔️ | throws an error when called with an empty string | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
| ✔️ | calls global with title containing $key in multiple positions | 1ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 0ms |
| ✔️ | calls global with cb function with object built from table headings and values | 1ms |
| ✔️ | calls global with given timeout | 0ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each .it
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 0ms |
| ✔️ | throws error when there are additional words in second column heading | 0ms |
| ✔️ | throws error when there are additional words in last column heading | 1ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 0ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 1ms |
| ✔️ | throws error when there are no arguments for given headings | 0ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 0ms |
| ✔️ | throws an error when called with an empty string | 0ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
| ✔️ | calls global with title containing $key in multiple positions | 5ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 1ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 1ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each .fit
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 0ms |
| ✔️ | throws error when there are additional words in second column heading | 1ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 0ms |
| ✔️ | throws error when there are no arguments for given headings | 1ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 0ms |
| ✔️ | throws an error when called with an empty string | 3ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 1ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 1ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each .it.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 1ms |
| ✔️ | throws error when there are additional words in second column heading | 0ms |
| ✔️ | throws error when there are additional words in last column heading | 1ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 0ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 1ms |
| ✔️ | throws error when there are no arguments for given headings | 0ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 1ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 0ms |
| ✔️ | throws an error when called with an empty string | 0ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 1ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 1ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each .describe
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 1ms |
| ✔️ | throws error when there are additional words in second column heading | 0ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 0ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 0ms |
| ✔️ | throws error when there are no arguments for given headings | 1ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 28ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 1ms |
| ✔️ | throws an error when called with an empty string | 1ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 4ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 0ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 1ms |
| ✔️ | calls global with cb function with object built from table headings and values | 1ms |
| ✔️ | calls global with given timeout | 17ms |
| ✔️ | formats primitive values using .toString() | 1ms |
jest-each .fdescribe
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 1ms |
| ✔️ | throws error when there are additional words in second column heading | 1ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 1ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 1ms |
| ✔️ | throws error when there are no arguments for given headings | 1ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 1ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 51ms |
| ✔️ | throws an error when called with an empty string | 1ms |
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 1ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 0ms |
| ✔️ | calls global with cb function with object built from table headings and values | 1ms |
| ✔️ | calls global with given timeout | 0ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each .describe.only
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error when there are additional words in first column heading | 1ms |
| ✔️ | throws error when there are additional words in second column heading | 0ms |
| ✔️ | throws error when there are additional words in last column heading | 0ms |
| ✔️ | does not throw error when there is additional words in template after heading row | 1ms |
| ✔️ | does not throw error when there is only one column | 0ms |
| ✔️ | does not throw error when there is only one column with additional words in template after heading | 0ms |
| ✔️ | throws error when there are no arguments for given headings | 1ms |
| ✔️ | throws error when there are fewer arguments than headings when given one row | 0ms |
| ✔️ | throws error when there are fewer arguments than headings over multiple rows | 0ms |
| ✔️ | throws an error when called with an empty string | 0ms |
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
| ✔️ | calls global with title containing $key in multiple positions | 0ms |
| ✔️ | calls global with title containing $key.path | 1ms |
| ✔️ | calls global with title containing last seen object when $key.path is invalid | 0ms |
| ✔️ | calls global with cb function with object built from table headings and values | 0ms |
| ✔️ | calls global with given timeout | 1ms |
| ✔️ | formats primitive values using .toString() | 0ms |
jest-each done callback
| Result | Test | Time |
|---|---|---|
| ✔️ | calls [ 'test' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'test', 'only' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'test', 'concurrent', 'only' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'it' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'fit' ] with done when cb function has more args than params of given test row | 0ms |
| ✔️ | calls [ 'it', 'only' ] with done when cb function has more args than params of given test row | 1ms |
| ✔️ | does not call [ 'describe' ] with done when test function has more args than params of given test row | 7ms |
| ✔️ | does not call [ 'fdescribe' ] with done when test function has more args than params of given test row | 2ms |
| ✔️ | does not call [ 'describe', 'only' ] with done when test function has more args than params of given test row | 0ms |
jest-each .xtest
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 2ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
jest-each .test.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
jest-each .xit
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
jest-each .it.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 1ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
jest-each .xdescribe
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 1ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 0ms |
jest-each .describe.skip
| Result | Test | Time |
|---|---|---|
| ✔️ | calls global with given title | 0ms |
| ✔️ | calls global with given title when multiple tests cases exist | 0ms |
| ✔️ | calls global with title containing param values when using $variable format | 1ms |
packages/pretty-format/src/tests/react.test.tsx ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | supports a single element with no props or children | 5ms |
| ✔️ | supports a single element with non-empty string child | 0ms |
| ✔️ | supports a single element with empty string child | 1ms |
| ✔️ | supports a single element with non-zero number child | 0ms |
| ✔️ | supports a single element with zero number child | 0ms |
| ✔️ | supports a single element with mixed children | 1ms |
| ✔️ | supports props with strings | 1ms |
| ✔️ | supports props with multiline strings | 0ms |
| ✔️ | supports props with numbers | 1ms |
| ✔️ | supports a single element with a function prop | 0ms |
| ✔️ | supports a single element with a object prop | 1ms |
| ✔️ | supports an element with and object prop and children | 1ms |
| ✔️ | supports an element with complex props and mixed children | 0ms |
| ✔️ | escapes children properly | 1ms |
| ✔️ | supports everything all together | 1ms |
| ✔️ | sorts props in nested components | 1ms |
| ✔️ | supports a single element with React elements as props | 0ms |
| ✔️ | supports a single element with React elements with props | 1ms |
| ✔️ | supports a single element with custom React elements with props | 0ms |
| ✔️ | supports a single element with custom React elements with props (using displayName) | 1ms |
| ✔️ | supports a single element with custom React elements with props (using anonymous function) | 0ms |
| ✔️ | supports a single element with custom React elements with a child | 1ms |
| ✔️ | supports undefined element type | 0ms |
| ✔️ | supports a fragment with no children | 0ms |
| ✔️ | supports a fragment with string child | 0ms |
| ✔️ | supports a fragment with element child | 0ms |
| ✔️ | supports suspense | 1ms |
| ✔️ | supports a single element with React elements with a child | 0ms |
| ✔️ | supports a single element with React elements with children | 0ms |
| ✔️ | supports a single element with React elements with array children | 0ms |
| ✔️ | supports array of elements | 1ms |
| ✔️ | min option | 0ms |
| ✔️ | ReactElement plugin highlights syntax | 1ms |
| ✔️ | ReactTestComponent plugin highlights syntax | 0ms |
| ✔️ | throws if theme option is null | 50ms |
| ✔️ | throws if theme option is not of type "object" | 0ms |
| ✔️ | throws if theme option has value that is undefined in ansi-styles | 1ms |
| ✔️ | ReactElement plugin highlights syntax with color from theme option | 0ms |
| ✔️ | ReactTestComponent plugin highlights syntax with color from theme option | 0ms |
| ✔️ | supports forwardRef with a child | 0ms |
| ✔️ | supports context Provider with a child | 1ms |
| ✔️ | supports context Consumer with a child | 0ms |
| ✔️ | ReactElement removes undefined props | 0ms |
| ✔️ | ReactTestComponent removes undefined props | 1ms |
test object for subset match
| Result | Test | Time |
|---|---|---|
| ✔️ | undefined props | 0ms |
| ✔️ | undefined children | 0ms |
indent option
| Result | Test | Time |
|---|---|---|
| ✔️ | default implicit: 2 spaces | 1ms |
| ✔️ | default explicit: 2 spaces | 0ms |
| ✔️ | non-default: 0 spaces | 1ms |
| ✔️ | non-default: 4 spaces | 0ms |
maxDepth option
| Result | Test | Time |
|---|---|---|
| ✔️ | elements | 1ms |
| ✔️ | array of elements | 0ms |
React.memo without displayName
| Result | Test | Time |
|---|---|---|
| ✔️ | renders the component name | 0ms |
React.memo with displayName
| Result | Test | Time |
|---|---|---|
| ✔️ | renders the displayName of component before memoizing | 0ms |
| ✔️ | renders the displayName of memoized component | 0ms |
packages/jest-circus/src/tests/afterAll.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | tests are not marked done until their parent afterAll runs | 2231ms |
| ✔️ | describe block cannot have hooks and no tests | 697ms |
| ✔️ | describe block can have hooks if a child describe block has tests | 650ms |
| ✔️ | describe block hooks must not run if describe block is skipped | 599ms |
| ✔️ | child tests marked with todo should not run if describe block is skipped | 677ms |
| ✔️ | child tests marked with only should not run if describe block is skipped | 724ms |
packages/pretty-format/src/tests/prettyFormat.test.ts ✔️
prettyFormat()
| Result | Test | Time |
|---|---|---|
| ✔️ | prints empty arguments | 1ms |
| ✔️ | prints arguments | 0ms |
| ✔️ | prints an empty array | 0ms |
| ✔️ | prints an array with items | 0ms |
| ✔️ | prints a empty typed array | 0ms |
| ✔️ | prints a typed array with items | 1ms |
| ✔️ | prints an array buffer | 0ms |
| ✔️ | prints a nested array | 0ms |
| ✔️ | prints true | 0ms |
| ✔️ | prints false | 1ms |
| ✔️ | prints an error | 0ms |
| ✔️ | prints a typed error with a message | 0ms |
| ✔️ | prints a function constructor | 0ms |
| ✔️ | prints an anonymous callback function | 0ms |
| ✔️ | prints an anonymous assigned function | 0ms |
| ✔️ | prints a named function | 0ms |
| ✔️ | prints a named generator function | 0ms |
| ✔️ | can customize function names | 1ms |
| ✔️ | prints Infinity | 0ms |
| ✔️ | prints -Infinity | 0ms |
| ✔️ | prints an empty map | 0ms |
| ✔️ | prints a map with values | 1ms |
| ✔️ | prints a map with non-string keys | 0ms |
| ✔️ | prints NaN | 0ms |
| ✔️ | prints null | 1ms |
| ✔️ | prints a positive number | 0ms |
| ✔️ | prints a negative number | 0ms |
| ✔️ | prints zero | 1ms |
| ✔️ | prints negative zero | 0ms |
| ✔️ | prints a positive bigint | 7ms |
| ✔️ | prints a negative bigint | 0ms |
| ✔️ | prints zero bigint | 0ms |
| ✔️ | prints negative zero bigint | 0ms |
| ✔️ | prints a date | 1ms |
| ✔️ | prints an invalid date | 0ms |
| ✔️ | prints an empty object | 1ms |
| ✔️ | prints an object with properties | 0ms |
| ✔️ | prints an object with properties and symbols | 0ms |
| ✔️ | prints an object without non-enumerable properties which have string key | 1ms |
| ✔️ | prints an object without non-enumerable properties which have symbol key | 0ms |
| ✔️ | prints an object with sorted properties | 0ms |
| ✔️ | prints regular expressions from constructors | 0ms |
| ✔️ | prints regular expressions from literals | 1ms |
| ✔️ | prints regular expressions {escapeRegex: false} | 0ms |
| ✔️ | prints regular expressions {escapeRegex: true} | 1ms |
| ✔️ | escapes regular expressions nested inside object | 4ms |
| ✔️ | prints an empty set | 0ms |
| ✔️ | prints a set with values | 1ms |
| ✔️ | prints a string | 0ms |
| ✔️ | prints and escape a string | 0ms |
| ✔️ | doesn't escape string with {excapeString: false} | 0ms |
| ✔️ | prints a string with escapes | 0ms |
| ✔️ | prints a multiline string | 0ms |
| ✔️ | prints a multiline string as value of object property | 1ms |
| ✔️ | prints a symbol | 0ms |
| ✔️ | prints undefined | 0ms |
| ✔️ | prints a WeakMap | 0ms |
| ✔️ | prints a WeakSet | 0ms |
| ✔️ | prints deeply nested objects | 1ms |
| ✔️ | prints circular references | 0ms |
| ✔️ | prints parallel references | 0ms |
| ✔️ | can customize the max depth | 0ms |
| ✔️ | throws on invalid options | 32ms |
| ✔️ | supports plugins | 1ms |
| ✔️ | supports plugins that return empty string | 0ms |
| ✔️ | throws if plugin does not return a string | 0ms |
| ✔️ | throws PrettyFormatPluginError if test throws an error | 1ms |
| ✔️ | throws PrettyFormatPluginError if print throws an error | 1ms |
| ✔️ | throws PrettyFormatPluginError if serialize throws an error | 0ms |
| ✔️ | supports plugins with deeply nested arrays (#24) | 0ms |
| ✔️ | should call plugins on nested basic values | 1ms |
| ✔️ | prints objects with no constructor | 0ms |
| ✔️ | prints identity-obj-proxy with string constructor | 0ms |
| ✔️ | calls toJSON and prints its return value | 0ms |
| ✔️ | calls toJSON and prints an internal representation. | 0ms |
| ✔️ | calls toJSON only on functions | 1ms |
| ✔️ | does not call toJSON recursively | 0ms |
| ✔️ | calls toJSON on Sets | 0ms |
| ✔️ | disables toJSON calls through options | 0ms |
prettyFormat() indent option
| Result | Test | Time |
|---|---|---|
| ✔️ | default implicit: 2 spaces | 0ms |
| ✔️ | default explicit: 2 spaces | 0ms |
| ✔️ | non-default: 0 spaces | 1ms |
| ✔️ | non-default: 4 spaces | 0ms |
prettyFormat() min
| Result | Test | Time |
|---|---|---|
| ✔️ | prints some basic values in min mode | 0ms |
| ✔️ | prints some complex values in min mode | 0ms |
| ✔️ | does not allow indent !== 0 in min mode | 1ms |
packages/jest-worker/src/tests/Farm.test.js ✔️
Farm
| Result | Test | Time |
|---|---|---|
| ✔️ | sends a request to one worker | 1ms |
| ✔️ | sends four requests to four unique workers | 1ms |
| ✔️ | handles null computeWorkerKey, sending to first worker | 1ms |
| ✔️ | sends the same worker key to the same worker | 9ms |
| ✔️ | returns the result if the call worked | 1ms |
| ✔️ | throws if the call failed | 0ms |
| ✔️ | checks that once a sticked task finishes, next time is sent to that worker | 0ms |
| ✔️ | checks that even before a sticked task finishes, next time is sent to that worker | 8ms |
| ✔️ | checks that locking works, and jobs are never lost | 1ms |
| ✔️ | can receive custom messages from workers | 0ms |
packages/jest-worker/src/workers/tests/threadChild.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | lazily requires the file | 26ms |
| ✔️ | calls initialize with the correct arguments | 1ms |
| ✔️ | returns results immediately when function is synchronous | 15ms |
| ✔️ | returns results when it gets resolved if function is asynchronous | 22ms |
| ✔️ | calls the main module if the method call is "default" | 1ms |
| ✔️ | calls the main export if the method call is "default" and it is a Babel transpiled one | 1ms |
| ✔️ | removes the message listener on END message | 0ms |
| ✔️ | calls the teardown method | 1ms |
| ✔️ | throws if an invalid message is detected | 1ms |
| ✔️ | throws if child is not forked | 1ms |
packages/jest-jasmine2/src/tests/queueRunner.test.ts ✔️
queueRunner
| Result | Test | Time |
|---|---|---|
| ✔️ | runs every function in the queue. | 1ms |
| ✔️ | exposes fail to next. |
1ms |
| ✔️ | passes errors to onException. |
0ms |
| ✔️ | passes an error to onException on timeout. |
4ms |
| ✔️ | calls fail with arguments |
1ms |
| ✔️ | calls fail when done(error) is invoked |
0ms |
packages/jest-worker/src/workers/tests/NodeThreadsWorker.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | passes fork options down to child_process.fork, adding the defaults | 67ms |
| ✔️ | passes workerId to the thread and assign it to env.JEST_WORKER_ID | 1ms |
| ✔️ | initializes the thread with the given workerPath | 1ms |
| ✔️ | stops initializing the worker after the amount of retries is exceeded | 26ms |
| ✔️ | provides stdout and stderr from the threads | 5ms |
| ✔️ | sends the task to the thread | 1ms |
| ✔️ | resends the task to the thread after a retry | 2ms |
| ✔️ | calls the onProcessStart method synchronously if the queue is empty | 4ms |
| ✔️ | can send multiple messages to parent | 2ms |
| ✔️ | creates error instances for known errors | 5ms |
| ✔️ | throws when the thread returns a strange message | 1ms |
| ✔️ | does not restart the thread if it cleanly exited | 0ms |
| ✔️ | resolves waitForExit() after the thread cleanly exited | 0ms |
| ✔️ | restarts the thread when the thread dies | 0ms |
| ✔️ | terminates the thread when forceExit() is called | 0ms |
packages/jest-worker/src/workers/tests/processChild.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | lazily requires the file | 28ms |
| ✔️ | calls initialize with the correct arguments | 1ms |
| ✔️ | returns results immediately when function is synchronous | 13ms |
| ✔️ | returns results when it gets resolved if function is asynchronous | 23ms |
| ✔️ | calls the main module if the method call is "default" | 0ms |
| ✔️ | calls the main export if the method call is "default" and it is a Babel transpiled one | 1ms |
| ✔️ | removes the message listener on END message | 1ms |
| ✔️ | calls the teardown method | 0ms |
| ✔️ | throws if an invalid message is detected | 1ms |
| ✔️ | throws if child is not forked | 1ms |
packages/jest-runner/src/tests/testRunner.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | injects the serializable module map into each worker in watch mode | 2ms |
| ✔️ | assign process.env.JEST_WORKER_ID = 1 when in runInBand mode | 1ms |
packages/jest-circus/src/tests/hooksError.test.ts ✔️
beforeEach hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | beforeEach throws an error when "String" is provided as a first argument to it | 19ms |
| ✔️ | beforeEach throws an error when 1 is provided as a first argument to it | 1ms |
| ✔️ | beforeEach throws an error when [] is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when {} is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when Symbol(hello) is provided as a first argument to it | 1ms |
| ✔️ | beforeEach throws an error when true is provided as a first argument to it | 1ms |
| ✔️ | beforeEach throws an error when null is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when undefined is provided as a first argument to it | 1ms |
beforeAll hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | beforeAll throws an error when "String" is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when 1 is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when [] is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when {} is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when Symbol(hello) is provided as a first argument to it | 1ms |
| ✔️ | beforeAll throws an error when true is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when null is provided as a first argument to it | 1ms |
| ✔️ | beforeAll throws an error when undefined is provided as a first argument to it | 0ms |
afterEach hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | afterEach throws an error when "String" is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when 1 is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when [] is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when {} is provided as a first argument to it | 1ms |
| ✔️ | afterEach throws an error when Symbol(hello) is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when true is provided as a first argument to it | 1ms |
| ✔️ | afterEach throws an error when null is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when undefined is provided as a first argument to it | 0ms |
afterAll hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | afterAll throws an error when "String" is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when 1 is provided as a first argument to it | 0ms |
| ✔️ | afterAll throws an error when [] is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when {} is provided as a first argument to it | 3ms |
| ✔️ | afterAll throws an error when Symbol(hello) is provided as a first argument to it | 5ms |
| ✔️ | afterAll throws an error when true is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when null is provided as a first argument to it | 0ms |
| ✔️ | afterAll throws an error when undefined is provided as a first argument to it | 0ms |
packages/jest-serializer/src/tests/index.test.ts ✔️
Using V8 implementation
| Result | Test | Time |
|---|---|---|
| ✔️ | throws the error with an invalid serialization | 6ms |
Using V8 implementation Object 0
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 1ms |
| ✔️ | serializes/deserializes in disk | 0ms |
Using V8 implementation Object 1
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 0ms |
| ✔️ | serializes/deserializes in disk | 0ms |
Using V8 implementation Object 2
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 1ms |
| ✔️ | serializes/deserializes in disk | 1ms |
Using V8 implementation Object 3
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 0ms |
| ✔️ | serializes/deserializes in disk | 1ms |
Using V8 implementation Object 4
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 0ms |
| ✔️ | serializes/deserializes in disk | 0ms |
Using V8 implementation Object 5
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 1ms |
| ✔️ | serializes/deserializes in disk | 0ms |
Using V8 implementation Object 6
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 1ms |
| ✔️ | serializes/deserializes in disk | 0ms |
Using V8 implementation Object 7
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes/deserializes in memory | 1ms |
| ✔️ | serializes/deserializes in disk | 0ms |
packages/jest-console/src/tests/bufferedConsole.test.ts ✔️
CustomConsole assert
| Result | Test | Time |
|---|---|---|
| ✔️ | do not log when the assertion is truthy | 1ms |
| ✔️ | do not log when the assertion is truthy and there is a message | 0ms |
| ✔️ | log the assertion error when the assertion is falsy | 33ms |
| ✔️ | log the assertion error when the assertion is falsy with another message argument | 0ms |
CustomConsole count
| Result | Test | Time |
|---|---|---|
| ✔️ | count using the default counter | 0ms |
| ✔️ | count using the a labeled counter | 0ms |
| ✔️ | countReset restarts default counter | 1ms |
| ✔️ | countReset restarts custom counter | 1ms |
CustomConsole group
| Result | Test | Time |
|---|---|---|
| ✔️ | group without label | 1ms |
| ✔️ | group with label | 1ms |
| ✔️ | groupEnd remove the indentation of the current group | 1ms |
| ✔️ | groupEnd can not remove the indentation below the starting point | 1ms |
CustomConsole time
| Result | Test | Time |
|---|---|---|
| ✔️ | should return the time between time() and timeEnd() on default timer | 0ms |
| ✔️ | should return the time between time() and timeEnd() on custom timer | 1ms |
CustomConsole dir
| Result | Test | Time |
|---|---|---|
| ✔️ | should print the deepest value | 2ms |
CustomConsole timeLog
| Result | Test | Time |
|---|---|---|
| ✔️ | should return the time between time() and timeEnd() on default timer | 0ms |
| ✔️ | should return the time between time() and timeEnd() on custom timer | 1ms |
| ✔️ | default timer with data | 1ms |
| ✔️ | custom timer with data | 1ms |
CustomConsole console
| Result | Test | Time |
|---|---|---|
| ✔️ | should be able to initialize console instance | 0ms |
packages/jest-console/src/tests/CustomConsole.test.ts ✔️
CustomConsole log
| Result | Test | Time |
|---|---|---|
| ✔️ | should print to stdout | 1ms |
CustomConsole error
| Result | Test | Time |
|---|---|---|
| ✔️ | should print to stderr | 1ms |
CustomConsole warn
| Result | Test | Time |
|---|---|---|
| ✔️ | should print to stderr | 1ms |
CustomConsole assert
| Result | Test | Time |
|---|---|---|
| ✔️ | do not log when the assertion is truthy | 1ms |
| ✔️ | do not log when the assertion is truthy and there is a message | 0ms |
| ✔️ | log the assertion error when the assertion is falsy | 18ms |
| ✔️ | log the assertion error when the assertion is falsy with another message argument | 0ms |
CustomConsole count
| Result | Test | Time |
|---|---|---|
| ✔️ | count using the default counter | 1ms |
| ✔️ | count using the a labeled counter | 3ms |
| ✔️ | countReset restarts default counter | 1ms |
| ✔️ | countReset restarts custom counter | 0ms |
CustomConsole group
| Result | Test | Time |
|---|---|---|
| ✔️ | group without label | 0ms |
| ✔️ | group with label | 0ms |
| ✔️ | groupEnd remove the indentation of the current group | 0ms |
| ✔️ | groupEnd can not remove the indentation below the starting point | 0ms |
CustomConsole time
| Result | Test | Time |
|---|---|---|
| ✔️ | should return the time between time() and timeEnd() on default timer | 0ms |
| ✔️ | should return the time between time() and timeEnd() on custom timer | 0ms |
CustomConsole dir
| Result | Test | Time |
|---|---|---|
| ✔️ | should print the deepest value | 0ms |
CustomConsole timeLog
| Result | Test | Time |
|---|---|---|
| ✔️ | should return the time between time() and timeEnd() on default timer | 1ms |
| ✔️ | should return the time between time() and timeEnd() on custom timer | 0ms |
| ✔️ | default timer with data | 1ms |
| ✔️ | custom timer with data | 0ms |
CustomConsole console
| Result | Test | Time |
|---|---|---|
| ✔️ | should be able to initialize console instance | 0ms |
packages/pretty-format/src/tests/DOMCollection.test.ts ✔️
DOMCollection plugin for object properties
| Result | Test | Time |
|---|---|---|
| ✔️ | supports DOMStringMap | 1ms |
| ✔️ | supports NamedNodeMap | 0ms |
| ✔️ | supports config.min option | 1ms |
DOMCollection plugin for list items
| Result | Test | Time |
|---|---|---|
| ✔️ | supports HTMLCollection for getElementsByTagName | 2ms |
| ✔️ | supports HTMLCollection for children | 1ms |
| ✔️ | supports config.maxDepth option | 0ms |
| ✔️ | supports NodeList for querySelectorAll | 4ms |
| ✔️ | supports NodeList for childNodes | 1ms |
| ✔️ | supports HTMLOptionsCollection for select options | 0ms |
| ✔️ | supports HTMLCollection for form elements | 1ms |
packages/jest-circus/src/tests/circusItTodoTestError.test.ts ✔️
test/it.todo error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | todo throws error when given no arguments | 35ms |
| ✔️ | todo throws error when given more than one argument | 1ms |
| ✔️ | todo throws error when given none string description | 0ms |
packages/jest-test-sequencer/src/tests/test_sequencer.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | sorts by file size if there is no timing information | 1ms |
| ✔️ | sorts based on timing information | 1ms |
| ✔️ | sorts based on failures and timing information | 0ms |
| ✔️ | sorts based on failures, timing information and file size | 1ms |
| ✔️ | writes the cache based on results without existing cache | 0ms |
| ✔️ | returns failed tests in sorted order | 1ms |
| ✔️ | writes the cache based on the results | 13ms |
| ✔️ | works with multiple contexts | 0ms |
packages/jest-jasmine2/src/tests/Suite.test.ts ✔️
Suite
| Result | Test | Time |
|---|---|---|
| ✔️ | doesn't throw on addExpectationResult when there are no children | 0ms |
packages/pretty-format/src/tests/AsymmetricMatcher.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | supports any(String) | 1ms |
| ✔️ | supports nested any(String) | 0ms |
| ✔️ | supports any(Function) | 0ms |
| ✔️ | supports nested any(Function) | 0ms |
| ✔️ | supports any(Array) | 0ms |
| ✔️ | supports nested any(Array) | 1ms |
| ✔️ | supports any(Object) | 0ms |
| ✔️ | supports nested any(Object) | 0ms |
| ✔️ | supports any(RegExp) | 0ms |
| ✔️ | supports nested any(RegExp) | 0ms |
| ✔️ | supports any(Symbol) | 0ms |
| ✔️ | supports nested any(Symbol) | 0ms |
| ✔️ | supports any(Function) | 0ms |
| ✔️ | supports nested any(Function) | 0ms |
| ✔️ | supports any() | 1ms |
| ✔️ | supports nested any() | 0ms |
| ✔️ | supports any(namedFuntction) | 0ms |
| ✔️ | supports nested any(namedFuntction) | 0ms |
| ✔️ | anything() | 0ms |
| ✔️ | arrayContaining() | 0ms |
| ✔️ | arrayNotContaining() | 0ms |
| ✔️ | objectContaining() | 0ms |
| ✔️ | objectNotContaining() | 1ms |
| ✔️ | stringContaining(string) | 0ms |
| ✔️ | not.stringContaining(string) | 0ms |
| ✔️ | stringMatching(string) | 0ms |
| ✔️ | stringMatching(regexp) | 0ms |
| ✔️ | stringMatching(regexp) {escapeRegex: false} | 3ms |
| ✔️ | stringMatching(regexp) {escapeRegex: true} | 13ms |
| ✔️ | stringNotMatching(string) | 1ms |
| ✔️ | supports multiple nested asymmetric matchers | 0ms |
| ✔️ | min option | 0ms |
indent option
| Result | Test | Time |
|---|---|---|
| ✔️ | default implicit: 2 spaces | 0ms |
| ✔️ | default explicit: 2 spaces | 0ms |
| ✔️ | non-default: 0 spaces | 0ms |
| ✔️ | non-default: 4 spaces | 0ms |
maxDepth option
| Result | Test | Time |
|---|---|---|
| ✔️ | matchers as leaf nodes | 0ms |
| ✔️ | matchers as internal nodes | 1ms |
packages/pretty-format/src/tests/ConvertAnsi.test.ts ✔️
ConvertAnsi plugin
| Result | Test | Time |
|---|---|---|
| ✔️ | supports style.red | 1ms |
| ✔️ | supports style.green | 0ms |
| ✔️ | supports style.reset | 1ms |
| ✔️ | supports style.bold | 0ms |
| ✔️ | supports style.dim | 1ms |
| ✔️ | does not support other colors | 0ms |
packages/jest-console/src/tests/getConsoleOutput.test.ts ✔️
getConsoleOutput
| Result | Test | Time |
|---|---|---|
| ✔️ | takes noStackTrace and pass it on for assert | 2ms |
| ✔️ | takes noStackTrace and pass it on for count | 0ms |
| ✔️ | takes noStackTrace and pass it on for debug | 1ms |
| ✔️ | takes noStackTrace and pass it on for dir | 1ms |
| ✔️ | takes noStackTrace and pass it on for dirxml | 0ms |
| ✔️ | takes noStackTrace and pass it on for error | 0ms |
| ✔️ | takes noStackTrace and pass it on for group | 1ms |
| ✔️ | takes noStackTrace and pass it on for groupCollapsed | 0ms |
| ✔️ | takes noStackTrace and pass it on for info | 0ms |
| ✔️ | takes noStackTrace and pass it on for log | 1ms |
| ✔️ | takes noStackTrace and pass it on for time | 1ms |
| ✔️ | takes noStackTrace and pass it on for warn | 0ms |
packages/jest-jasmine2/src/tests/expectationResultFactory.test.ts ✔️
expectationResultFactory
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the result if passed. | 1ms |
| ✔️ | returns the result if failed. | 5ms |
| ✔️ | returns the result if failed (with message). |
1ms |
| ✔️ | returns the result if failed (with error). |
1ms |
| ✔️ | returns the error name if the error message is empty | 0ms |
| ✔️ | returns the result if failed (with error as a string). |
0ms |
| ✔️ | returns the result if failed (with error.stack not as a string). |
1ms |
packages/jest-each/src/tests/index.test.ts ✔️
array .add
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the result of adding 0 to 0 | 0ms |
| ✔️ | returns the result of adding 0 to 1 | 0ms |
| ✔️ | returns the result of adding 1 to 1 | 1ms |
concurrent .add
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the result of adding 0 to 0 | 0ms |
| ✔️ | returns the result of adding 0 to 1 | 0ms |
| ✔️ | returns the result of adding 1 to 1 | 0ms |
template .add
| Result | Test | Time |
|---|---|---|
| ✔️ | returns 0 when given 0 and 0 | 0ms |
| ✔️ | returns 1 when given 0 and 1 | 0ms |
| ✔️ | returns 2 when given 1 and 1 | 1ms |
| Result | Test | Time |
|---|---|---|
| ✔️ | throws an error when not called with the right number of arguments | 0ms |
packages/pretty-format/src/tests/DOMElement.test.ts ✔️
pretty-format
| Result | Test | Time |
|---|---|---|
| ✔️ | prints global window as constructor name alone | 0ms |
DOMElement Plugin
| Result | Test | Time |
|---|---|---|
| ✔️ | supports a single HTML element | 2ms |
| ✔️ | supports an HTML element with a class property | 1ms |
| ✔️ | supports an HTML element with a title property | 1ms |
| ✔️ | escapes double quote in attribute value | 1ms |
| ✔️ | supports an HTML element with a single attribute | 1ms |
| ✔️ | supports an HTML element with multiple attributes | 0ms |
| ✔️ | supports an HTML element with attribute and text content | 3ms |
| ✔️ | supports an element with text content | 0ms |
| ✔️ | supports nested elements | 0ms |
| ✔️ | supports nested elements with attributes | 0ms |
| ✔️ | supports nested elements with attribute and text content | 0ms |
| ✔️ | supports nested elements with text content | 1ms |
| ✔️ | supports siblings | 4ms |
| ✔️ | supports multiline text node in pre | 1ms |
| ✔️ | supports multiline text node preceding span in pre | 8ms |
| ✔️ | supports multiline text node in textarea | 1ms |
| ✔️ | supports empty text node | 1ms |
| ✔️ | supports non-empty text node | 1ms |
| ✔️ | supports comment node | 3ms |
| ✔️ | supports fragment node | 1ms |
| ✔️ | supports custom elements | 2ms |
| ✔️ | supports SVG elements | 3ms |
| ✔️ | supports indentation for array of elements | 2ms |
| ✔️ | supports maxDepth option | 2ms |
| ✔️ | handles tagName not being a string |
1ms |
DOMElement Plugin matches constructor name of SVG elements
| Result | Test | Time |
|---|---|---|
| ✔️ | jsdom 9 and 10 | 1ms |
| ✔️ | jsdom 11 | 0ms |
packages/jest-test-result/src/tests/formatTestResults.test.ts ✔️
formatTestResults
| Result | Test | Time |
|---|---|---|
| ✔️ | includes test full name | 1ms |
packages/jest-worker/src/tests/index.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | exposes the right API using default working | 85ms |
| ✔️ | exposes the right API using passed worker | 1ms |
| ✔️ | breaks if any of the forbidden methods is tried to be exposed | 27ms |
| ✔️ | works with minimal options | 3ms |
| ✔️ | does not let make calls after the farm is ended | 2ms |
| ✔️ | does not let end the farm after it is ended | 4ms |
| ✔️ | calls doWork | 9ms |
| ✔️ | calls getStderr and getStdout from worker | 1ms |
packages/jest-jasmine2/src/tests/hooksError.test.ts ✔️
beforeEach hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | beforeEach throws an error when "String" is provided as a first argument to it | 2ms |
| ✔️ | beforeEach throws an error when 1 is provided as a first argument to it | 1ms |
| ✔️ | beforeEach throws an error when [] is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when {} is provided as a first argument to it | 1ms |
| ✔️ | beforeEach throws an error when Symbol(hello) is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when true is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when null is provided as a first argument to it | 0ms |
| ✔️ | beforeEach throws an error when undefined is provided as a first argument to it | 0ms |
beforeAll hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | beforeAll throws an error when "String" is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when 1 is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when [] is provided as a first argument to it | 1ms |
| ✔️ | beforeAll throws an error when {} is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when Symbol(hello) is provided as a first argument to it | 1ms |
| ✔️ | beforeAll throws an error when true is provided as a first argument to it | 0ms |
| ✔️ | beforeAll throws an error when null is provided as a first argument to it | 1ms |
| ✔️ | beforeAll throws an error when undefined is provided as a first argument to it | 1ms |
afterEach hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | afterEach throws an error when "String" is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when 1 is provided as a first argument to it | 1ms |
| ✔️ | afterEach throws an error when [] is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when {} is provided as a first argument to it | 1ms |
| ✔️ | afterEach throws an error when Symbol(hello) is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when true is provided as a first argument to it | 0ms |
| ✔️ | afterEach throws an error when null is provided as a first argument to it | 1ms |
| ✔️ | afterEach throws an error when undefined is provided as a first argument to it | 0ms |
afterAll hooks error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | afterAll throws an error when "String" is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when 1 is provided as a first argument to it | 0ms |
| ✔️ | afterAll throws an error when [] is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when {} is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when Symbol(hello) is provided as a first argument to it | 7ms |
| ✔️ | afterAll throws an error when true is provided as a first argument to it | 0ms |
| ✔️ | afterAll throws an error when null is provided as a first argument to it | 1ms |
| ✔️ | afterAll throws an error when undefined is provided as a first argument to it | 0ms |
packages/jest-jasmine2/src/tests/reporter.test.ts ✔️
Jasmine2Reporter
| Result | Test | Time |
|---|---|---|
| ✔️ | reports nested suites | 2ms |
packages/jest-jasmine2/src/tests/todoError.test.ts ✔️
test/it.todo error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | it throws error when given no arguments | 2ms |
| ✔️ | it throws error when given more than one argument | 0ms |
| ✔️ | it throws error when given none string description | 1ms |
packages/jest-jasmine2/src/tests/itTestError.test.ts ✔️
test/it error throwing
| Result | Test | Time |
|---|---|---|
| ✔️ | it throws error with missing callback function | 2ms |
| ✔️ | it throws an error when first argument isn't a string | 1ms |
| ✔️ | it throws an error when callback function is not a function | 0ms |
| ✔️ | test throws error with missing callback function | 0ms |
| ✔️ | test throws an error when first argument isn't a string | 1ms |
| ✔️ | test throws an error when callback function is not a function | 0ms |
packages/jest-jasmine2/src/tests/iterators.test.ts ✔️
iterators
| Result | Test | Time |
|---|---|---|
| ✔️ | works for arrays | 10ms |
| ✔️ | works for custom iterables | 1ms |
| ✔️ | works for Sets | 0ms |
| ✔️ | works for Maps | 1ms |
packages/jest-jasmine2/src/tests/pTimeout.test.ts ✔️
pTimeout
| Result | Test | Time |
|---|---|---|
| ✔️ | calls clearTimeout and resolves when promise resolves. |
1ms |
| ✔️ | calls clearTimeout and rejects when promise rejects. |
1ms |
| ✔️ | calls onTimeout on timeout. |
0ms |
packages/jest-create-cache-key-function/src/tests/index.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | creation of a cache key | 33ms |
packages/jest-jasmine2/src/tests/concurrent.test.ts ✔️
concurrent
| Result | Test | Time |
|---|---|---|
| ✔️ | should add 1 to number | 1ms |
| ✔️ | should add 1 to number | 0ms |
| ✔️ | should add 1 to number | 0ms |
packages/jest-jasmine2/src/tests/itToTestAlias.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | global.test | 0ms |
packages/pretty-format/src/tests/ReactElement.test.ts ✔️
ReactElement Plugin
| Result | Test | Time |
|---|---|---|
| ✔️ | serializes forwardRef without displayName | 1ms |
| ✔️ | serializes forwardRef with displayName | 0ms |
| ✔️ | serializes forwardRef component with displayName | 0ms |
packages/jest-worker/src/tests/FifoQueue.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the shared tasks in FIFO ordering | 1ms |
| ✔️ | returns the worker specific tasks in FIFO ordering | 1ms |
| ✔️ | maintains global FIFO ordering between worker specific and shared tasks | 1ms |
packages/jest-worker/src/tests/PriorityQueue.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the tasks in order | 3ms |
| ✔️ | returns the task with the lowest priority value if inserted in reversed order | 0ms |
| ✔️ | returns the task with the lowest priority value if inserted in correct order | 1ms |
| ✔️ | uses different queues for each worker | 0ms |
| ✔️ | process task in the global and shared queue in order | 1ms |
packages/jest-core/src/tests/SearchSource.test.ts ✔️
SearchSource isTestFilePath
| Result | Test | Time |
|---|---|---|
| ✔️ | supports ../ paths and unix separators via testRegex | 804ms |
| ✔️ | supports unix separators | 265ms |
| ✔️ | supports win32 separators | 277ms |
SearchSource testPathsMatching
| Result | Test | Time |
|---|---|---|
| ✔️ | finds tests matching a pattern via testRegex | 23ms |
| ✔️ | finds tests matching a pattern via testMatch | 14ms |
| ✔️ | finds tests matching a JS regex pattern | 12ms |
| ✔️ | finds tests matching a JS glob pattern | 13ms |
| ✔️ | finds tests matching a JS with overriding glob patterns | 18ms |
| ✔️ | finds tests with default file extensions using testRegex | 16ms |
| ✔️ | finds tests with default file extensions using testMatch | 13ms |
| ✔️ | finds tests with parentheses in their rootDir when using testMatch | 16ms |
| ✔️ | finds tests with similar but custom file extensions | 13ms |
| ✔️ | finds tests with totally custom foobar file extensions | 38ms |
| ✔️ | finds tests with many kinds of file extensions | 20ms |
| ✔️ | finds tests using a regex only | 41ms |
| ✔️ | finds tests using a glob only | 24ms |
SearchSource findRelatedTests
| Result | Test | Time |
|---|---|---|
| ✔️ | makes sure a file is related to itself | 60ms |
| ✔️ | finds tests that depend directly on the path | 15ms |
| ✔️ | excludes untested files from coverage | 17ms |
SearchSource findRelatedTestsFromPattern
| Result | Test | Time |
|---|---|---|
| ✔️ | returns empty search result for empty input | 18ms |
| ✔️ | returns empty search result for invalid input | 14ms |
| ✔️ | returns empty search result if no related tests were found | 15ms |
| ✔️ | finds tests for a single file | 24ms |
| ✔️ | finds tests for multiple files | 15ms |
| ✔️ | does not mistake roots folders with prefix names | 29ms |
SearchSource findRelatedSourcesFromTestsInChangedFiles
| Result | Test | Time |
|---|---|---|
| ✔️ | return empty set if no SCM | 22ms |
| ✔️ | return sources required by tests | 17ms |
packages/expect/src/tests/matchers.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should throw if passed two arguments | 46ms |
.rejects
| Result | Test | Time |
|---|---|---|
| ✔️ | should reject | 2ms |
| ✔️ | should reject with toThrow | 1ms |
| ✔️ | should reject async function to toThrow | 1ms |
| ✔️ | fails non-promise value "a" synchronously | 0ms |
| ✔️ | fails non-promise value "a" | 2ms |
| ✔️ | fails non-promise value [1] synchronously | 1ms |
| ✔️ | fails non-promise value [1] | 0ms |
| ✔️ | fails non-promise value [Function anonymous] synchronously | 0ms |
| ✔️ | fails non-promise value [Function anonymous] | 7ms |
| ✔️ | fails non-promise value {"a": 1} synchronously | 0ms |
| ✔️ | fails non-promise value {"a": 1} | 0ms |
| ✔️ | fails non-promise value 4 synchronously | 1ms |
| ✔️ | fails non-promise value 4 | 3ms |
| ✔️ | fails non-promise value null synchronously | 0ms |
| ✔️ | fails non-promise value null | 0ms |
| ✔️ | fails non-promise value true synchronously | 0ms |
| ✔️ | fails non-promise value true | 1ms |
| ✔️ | fails non-promise value undefined synchronously | 0ms |
| ✔️ | fails non-promise value undefined | 0ms |
| ✔️ | fails for promise that resolves | 4ms |
.resolves
| Result | Test | Time |
|---|---|---|
| ✔️ | should resolve | 1ms |
| ✔️ | fails non-promise value "a" synchronously | 0ms |
| ✔️ | fails non-promise value "a" | 0ms |
| ✔️ | fails non-promise value [1] synchronously | 1ms |
| ✔️ | fails non-promise value [1] | 0ms |
| ✔️ | fails non-promise value [Function anonymous] synchronously | 1ms |
| ✔️ | fails non-promise value [Function anonymous] | 0ms |
| ✔️ | fails non-promise value {"a": 1} synchronously | 1ms |
| ✔️ | fails non-promise value {"a": 1} | 0ms |
| ✔️ | fails non-promise value 4 synchronously | 1ms |
| ✔️ | fails non-promise value 4 | 0ms |
| ✔️ | fails non-promise value null synchronously | 0ms |
| ✔️ | fails non-promise value null | 1ms |
| ✔️ | fails non-promise value true synchronously | 0ms |
| ✔️ | fails non-promise value true | 0ms |
| ✔️ | fails non-promise value undefined synchronously | 1ms |
| ✔️ | fails non-promise value undefined | 0ms |
| ✔️ | fails for promise that rejects | 0ms |
.toBe()
| Result | Test | Time |
|---|---|---|
| ✔️ | does not throw | 1ms |
| ✔️ | fails for: 1 and 2 | 1ms |
| ✔️ | fails for: true and false | 0ms |
| ✔️ | fails for: [Function anonymous] and [Function anonymous] | 1ms |
| ✔️ | fails for: {} and {} | 1ms |
| ✔️ | fails for: {"a": 1} and {"a": 1} | 0ms |
| ✔️ | fails for: {"a": 1} and {"a": 5} | 2ms |
| ✔️ | fails for: {"a": [Function a], "b": 2} and {"a": Any, "b": 2} | 1ms |
| ✔️ | fails for: {"a": undefined, "b": 2} and {"b": 2} | 8ms |
| ✔️ | fails for: 2020-02-20T00:00:00.000Z and 2020-02-20T00:00:00.000Z | 0ms |
| ✔️ | fails for: 2020-02-21T00:00:00.000Z and 2020-02-20T00:00:00.000Z | 1ms |
| ✔️ | fails for: /received/ and /expected/ | 0ms |
| ✔️ | fails for: Symbol(received) and Symbol(expected) | 0ms |
| ✔️ | fails for: [Error: received] and [Error: expected] | 1ms |
| ✔️ | fails for: "abc" and "cde" | 1ms |
| ✔️ | fails for: "painless JavaScript testing" and "delightful JavaScript testing" | 0ms |
| ✔️ | fails for: "" and "compare one-line string to empty string" | 1ms |
| ✔️ | fails for: "with | |
| trailing space" and "without trailing space" | 8ms | |
| ✔️ | fails for: "four | |
| 4 | ||
| line | ||
| string" and "3 | ||
| line | ||
| string" | 0ms | |
| ✔️ | fails for: [] and [] | 1ms |
| ✔️ | fails for: null and undefined | 0ms |
| ✔️ | fails for: -0 and 0 | 0ms |
| ✔️ | fails for: 1n and 2n | 1ms |
| ✔️ | fails for: {"a": 1n} and {"a": 1n} | 0ms |
| ✔️ | fails for 'false' with '.not' | 0ms |
| ✔️ | fails for '1' with '.not' | 0ms |
| ✔️ | fails for '"a"' with '.not' | 0ms |
| ✔️ | fails for 'undefined' with '.not' | 0ms |
| ✔️ | fails for 'null' with '.not' | 0ms |
| ✔️ | fails for '{}' with '.not' | 0ms |
| ✔️ | fails for '[]' with '.not' | 1ms |
| ✔️ | fails for '1n' with '.not' | 0ms |
| ✔️ | fails for '1n' with '.not' | 0ms |
| ✔️ | does not crash on circular references | 0ms |
| ✔️ | assertion error matcherResult property contains matcher name, expected and actual values | 1ms |
.toStrictEqual()
| Result | Test | Time |
|---|---|---|
| ✔️ | does not ignore keys with undefined values | 0ms |
| ✔️ | does not ignore keys with undefined values inside an array | 0ms |
| ✔️ | does not ignore keys with undefined values deep inside an object | 0ms |
| ✔️ | passes when comparing same type | 1ms |
| ✔️ | matches the expected snapshot when it fails | 1ms |
| ✔️ | displays substring diff | 3ms |
| ✔️ | displays substring diff for multiple lines | 1ms |
| ✔️ | does not pass for different types | 0ms |
| ✔️ | does not simply compare constructor names | 1ms |
| ✔️ | passes for matching sparse arrays | 0ms |
| ✔️ | does not pass when sparseness of arrays do not match | 0ms |
| ✔️ | does not pass when equally sparse arrays have different values | 0ms |
.toEqual()
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: false} expect(true).toEqual(false) | 1ms |
| ✔️ | {pass: false} expect(1).toEqual(2) | 0ms |
| ✔️ | {pass: false} expect(0).toEqual(-0) | 1ms |
| ✔️ | {pass: false} expect(0).toEqual(5e-324) | 0ms |
| ✔️ | {pass: false} expect(5e-324).toEqual(0) | 0ms |
| ✔️ | {pass: false} expect(0).toEqual({}) | 1ms |
| ✔️ | {pass: false} expect({}).toEqual(0) | 0ms |
| ✔️ | {pass: false} expect({}).toEqual({}) | 1ms |
| ✔️ | {pass: false} expect("abc").toEqual({"0": "a", "1": "b", "2": "c"}) | 0ms |
| ✔️ | {pass: false} expect({"0": "a", "1": "b", "2": "c"}).toEqual("abc") | 1ms |
| ✔️ | {pass: false} expect(/abc/gsy).toEqual(/abc/g) | 0ms |
| ✔️ | {pass: false} expect({"a": 1}).toEqual({"a": 2}) | 1ms |
| ✔️ | {pass: false} expect({"a": 5}).toEqual({"b": 6}) | 0ms |
| ✔️ | {pass: false} expect({"foo": {"bar": 1}}).toEqual({"foo": {}}) | 1ms |
| ✔️ | {pass: false} expect({"getterAndSetter": {}}).toEqual({"getterAndSetter": {"foo": "bar"}}) | 1ms |
| ✔️ | {pass: false} expect({"frozenGetterAndSetter": {}}).toEqual({"frozenGetterAndSetter": {"foo": "bar"}}) | 0ms |
| ✔️ | {pass: false} expect({"getter": {}}).toEqual({"getter": {"foo": "bar"}}) | 1ms |
| ✔️ | {pass: false} expect({"frozenGetter": {}}).toEqual({"frozenGetter": {"foo": "bar"}}) | 0ms |
| ✔️ | {pass: false} expect({"setter": undefined}).toEqual({"setter": {"foo": "bar"}}) | 1ms |
| ✔️ | {pass: false} expect({"frozenSetter": undefined}).toEqual({"frozenSetter": {"foo": "bar"}}) | 1ms |
| ✔️ | {pass: false} expect("banana").toEqual("apple") | 0ms |
| ✔️ | {pass: false} expect("1 234,57 $").toEqual("1 234,57 $") | 0ms |
| ✔️ | {pass: false} expect("type TypeName = T extends Function ? "function" : "object";").toEqual("type TypeName = T extends Function | |
| ? "function" |
: "object";") | 1ms | | ✔️ | {pass: false} expect(null).toEqual(undefined) | 0ms | | ✔️ | {pass: false} expect([1]).toEqual([2]) | 1ms | | ✔️ | {pass: false} expect([1, 2]).toEqual([2, 1]) | 0ms | | ✔️ | {pass: false} expect(Immutable.List [1]).toEqual(Immutable.List [2]) | 1ms | | ✔️ | {pass: false} expect(Immutable.List [1, 2]).toEqual(Immutable.List [2, 1]) | 1ms | | ✔️ | {pass: false} expect(Map {}).toEqual(Set {}) | 0ms | | ✔️ | {pass: false} expect(Set {1, 2}).toEqual(Set {}) | 2ms | | ✔️ | {pass: false} expect(Set {1, 2}).toEqual(Set {1, 2, 3}) | 1ms | | ✔️ | {pass: false} expect(Set {[1], [2]}).toEqual(Set {[1], [2], [3]}) | 0ms | | ✔️ | {pass: false} expect(Set {[1], [2]}).toEqual(Set {[1], [2], [2]}) | 1ms | | ✔️ | {pass: false} expect(Set {Set {1}, Set {2}}).toEqual(Set {Set {1}, Set {3}}) | 0ms | | ✔️ | {pass: false} expect(Immutable.Set [1, 2]).toEqual(Immutable.Set []) | 1ms | | ✔️ | {pass: false} expect(Immutable.Set [1, 2]).toEqual(Immutable.Set [1, 2, 3]) | 1ms | | ✔️ | {pass: false} expect(Immutable.OrderedSet [1, 2]).toEqual(Immutable.OrderedSet [2, 1]) | 1ms | | ✔️ | {pass: false} expect(Map {1 => "one", 2 => "two"}).toEqual(Map {1 => "one"}) | 0ms | | ✔️ | {pass: false} expect(Map {"a" => 0}).toEqual(Map {"b" => 0}) | 1ms | | ✔️ | {pass: false} expect(Map {"v" => 1}).toEqual(Map {"v" => 2}) | 0ms | | ✔️ | {pass: false} expect(Map {["v"] => 1}).toEqual(Map {["v"] => 2}) | 1ms | | ✔️ | {pass: false} expect(Map {[1] => Map {[1] => "one"}}).toEqual(Map {[1] => Map {[1] => "two"}}) | 1ms | | ✔️ | {pass: false} expect(Immutable.Map {"a": 0}).toEqual(Immutable.Map {"b": 0}) | 0ms | | ✔️ | {pass: false} expect(Immutable.Map {"v": 1}).toEqual(Immutable.Map {"v": 2}) | 1ms | | ✔️ | {pass: false} expect(Immutable.OrderedMap {1: "one", 2: "two"}).toEqual(Immutable.OrderedMap {2: "two", 1: "one"}) | 1ms | | ✔️ | {pass: false} expect(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}).toEqual(Immutable.Map {"1": Immutable.Map {"2": {"a": 11}}}) | 1ms | | ✔️ | {pass: false} expect([97, 98, 99]).toEqual([97, 98, 100]) | 0ms | | ✔️ | {pass: false} expect({"a": 1, "b": 2}).toEqual(ObjectContaining {"a": 2}) | 1ms | | ✔️ | {pass: false} expect(false).toEqual(ObjectContaining {"a": 2}) | 0ms | | ✔️ | {pass: false} expect([1, 3]).toEqual(ArrayContaining [1, 2]) | 1ms | | ✔️ | {pass: false} expect(1).toEqual(ArrayContaining [1, 2]) | 0ms | | ✔️ | {pass: false} expect("abd").toEqual(StringContaining "bc") | 1ms | | ✔️ | {pass: false} expect("abd").toEqual(StringMatching /bc/i) | 0ms | | ✔️ | {pass: false} expect(undefined).toEqual(Anything) | 1ms | | ✔️ | {pass: false} expect(undefined).toEqual(Any) | 0ms | | ✔️ | {pass: false} expect("Eve").toEqual({"asymmetricMatch": [Function asymmetricMatch]}) | 1ms | | ✔️ | {pass: false} expect({"target": {"nodeType": 1, "value": "a"}}).toEqual({"target": {"nodeType": 1, "value": "b"}}) | 0ms | | ✔️ | {pass: false} expect({"nodeName": "div", "nodeType": 1}).toEqual({"nodeName": "p", "nodeType": 1}) | 1ms | | ✔️ | {pass: false} expect({Symbol(foo): 1, Symbol(bar): 2}).toEqual({Symbol(foo): Any, Symbol(bar): 1}) | 1ms | | ✔️ | {pass: false} expect(1n).toEqual(2n) | 1ms | | ✔️ | {pass: false} expect(1n).toEqual(1) | 0ms | | ✔️ | {pass: true} expect(true).not.toEqual(true) | 1ms | | ✔️ | {pass: true} expect(1).not.toEqual(1) | 0ms | | ✔️ | {pass: true} expect(NaN).not.toEqual(NaN) | 0ms | | ✔️ | {pass: true} expect(0).not.toEqual(0) | 0ms | | ✔️ | {pass: true} expect(0).not.toEqual(0) | 0ms | | ✔️ | {pass: true} expect({}).not.toEqual({}) | 1ms | | ✔️ | {pass: true} expect("abc").not.toEqual("abc") | 0ms | | ✔️ | {pass: true} expect("abc").not.toEqual("abc") | 0ms | | ✔️ | {pass: true} expect("abc").not.toEqual("abc") | 1ms | | ✔️ | {pass: true} expect([1]).not.toEqual([1]) | 0ms | | ✔️ | {pass: true} expect([1, 2]).not.toEqual([1, 2]) | 0ms | | ✔️ | {pass: true} expect(Immutable.List [1]).not.toEqual(Immutable.List [1]) | 1ms | | ✔️ | {pass: true} expect(Immutable.List [1, 2]).not.toEqual(Immutable.List [1, 2]) | 0ms | | ✔️ | {pass: true} expect({}).not.toEqual({}) | 1ms | | ✔️ | {pass: true} expect({"a": 99}).not.toEqual({"a": 99}) | 1ms | | ✔️ | {pass: true} expect(Set {}).not.toEqual(Set {}) | 0ms | | ✔️ | {pass: true} expect(Set {1, 2}).not.toEqual(Set {1, 2}) | 0ms | | ✔️ | {pass: true} expect(Set {1, 2}).not.toEqual(Set {2, 1}) | 1ms | | ✔️ | {pass: true} expect(Set {[1], [2]}).not.toEqual(Set {[2], [1]}) | 0ms | | ✔️ | {pass: true} expect(Set {Set {[1]}, Set {[2]}}).not.toEqual(Set {Set {[2]}, Set {[1]}}) | 1ms | | ✔️ | {pass: true} expect(Set {[1], [2], [3], [3]}).not.toEqual(Set {[3], [3], [2], [1]}) | 1ms | | ✔️ | {pass: true} expect(Set {{"a": 1}, {"b": 2}}).not.toEqual(Set {{"b": 2}, {"a": 1}}) | 0ms | | ✔️ | {pass: true} expect(Immutable.Set []).not.toEqual(Immutable.Set []) | 7ms | | ✔️ | {pass: true} expect(Immutable.Set [1, 2]).not.toEqual(Immutable.Set [1, 2]) | 0ms | | ✔️ | {pass: true} expect(Immutable.Set [1, 2]).not.toEqual(Immutable.Set [2, 1]) | 0ms | | ✔️ | {pass: true} expect(Immutable.OrderedSet []).not.toEqual(Immutable.OrderedSet []) | 0ms | | ✔️ | {pass: true} expect(Immutable.OrderedSet [1, 2]).not.toEqual(Immutable.OrderedSet [1, 2]) | 0ms | | ✔️ | {pass: true} expect(Map {}).not.toEqual(Map {}) | 1ms | | ✔️ | {pass: true} expect(Map {1 => "one", 2 => "two"}).not.toEqual(Map {1 => "one", 2 => "two"}) | 0ms | | ✔️ | {pass: true} expect(Map {1 => "one", 2 => "two"}).not.toEqual(Map {2 => "two", 1 => "one"}) | 1ms | | ✔️ | {pass: true} expect(Map {[1] => "one", [2] => "two", [3] => "three", [3] => "four"}).not.toEqual(Map {[3] => "three", [3] => "four", [2] => "two", [1] => "one"}) | 0ms | | ✔️ | {pass: true} expect(Map {[1] => Map {[1] => "one"}, [2] => Map {[2] => "two"}}).not.toEqual(Map {[2] => Map {[2] => "two"}, [1] => Map {[1] => "one"}}) | 1ms | | ✔️ | {pass: true} expect(Map {[1] => "one", [2] => "two"}).not.toEqual(Map {[2] => "two", [1] => "one"}) | 1ms | | ✔️ | {pass: true} expect(Map {{"a": 1} => "one", {"b": 2} => "two"}).not.toEqual(Map {{"b": 2} => "two", {"a": 1} => "one"}) | 0ms | | ✔️ | {pass: true} expect(Map {1 => ["one"], 2 => ["two"]}).not.toEqual(Map {2 => ["two"], 1 => ["one"]}) | 1ms | | ✔️ | {pass: true} expect(Immutable.Map {}).not.toEqual(Immutable.Map {}) | 0ms | | ✔️ | {pass: true} expect(Immutable.Map {1: "one", 2: "two"}).not.toEqual(Immutable.Map {1: "one", 2: "two"}) | 0ms | | ✔️ | {pass: true} expect(Immutable.Map {1: "one", 2: "two"}).not.toEqual(Immutable.Map {2: "two", 1: "one"}) | 0ms | | ✔️ | {pass: true} expect(Immutable.OrderedMap {1: "one", 2: "two"}).not.toEqual(Immutable.OrderedMap {1: "one", 2: "two"}) | 1ms | | ✔️ | {pass: true} expect(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}).not.toEqual(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}) | 1ms | | ✔️ | {pass: true} expect([97, 98, 99]).not.toEqual([97, 98, 99]) | 0ms | | ✔️ | {pass: true} expect({"a": 1, "b": 2}).not.toEqual(ObjectContaining {"a": 1}) | 0ms | | ✔️ | {pass: true} expect([1, 2, 3]).not.toEqual(ArrayContaining [2, 3]) | 0ms | | ✔️ | {pass: true} expect("abcd").not.toEqual(StringContaining "bc") | 0ms | | ✔️ | {pass: true} expect("abcd").not.toEqual(StringMatching /bc/) | 1ms | | ✔️ | {pass: true} expect(true).not.toEqual(Anything) | 0ms | | ✔️ | {pass: true} expect([Function anonymous]).not.toEqual(Any) | 0ms | | ✔️ | {pass: true} expect({"a": 1, "b": [Function b], "c": true}).not.toEqual({"a": 1, "b": Any, "c": Anything}) | 1ms | | ✔️ | {pass: true} expect("Alice").not.toEqual({"asymmetricMatch": [Function asymmetricMatch]}) | 1ms | | ✔️ | {pass: true} expect({"nodeName": "div", "nodeType": 1}).not.toEqual({"nodeName": "div", "nodeType": 1}) | 0ms | | ✔️ | {pass: true} expect({Symbol(foo): 1, Symbol(bar): 2}).not.toEqual({Symbol(foo): Any, Symbol(bar): 2}) | 1ms | | ✔️ | {pass: true} expect(1n).not.toEqual(1n) | 0ms | | ✔️ | {pass: true} expect(0n).not.toEqual(0n) | 1ms | | ✔️ | {pass: true} expect([1n]).not.toEqual([1n]) | 0ms | | ✔️ | {pass: true} expect([1n, 2]).not.toEqual([1n, 2]) | 0ms | | ✔️ | {pass: true} expect(Immutable.List [1n]).not.toEqual(Immutable.List [1n]) | 1ms | | ✔️ | {pass: true} expect({"a": 99n}).not.toEqual({"a": 99n}) | 0ms | | ✔️ | {pass: true} expect(Set {1n, 2n}).not.toEqual(Set {1n, 2n}) | 1ms | | ✔️ | assertion error matcherResult property contains matcher name, expected and actual values | 0ms | | ✔️ | symbol based keys in arrays are processed correctly | 1ms | | ✔️ | non-enumerable members should be skipped during equal | 0ms | | ✔️ | non-enumerable symbolic members should be skipped during equal | 0ms |
.toEqual() cyclic object equality
| Result | Test | Time |
|---|---|---|
| ✔️ | properties with the same circularity are equal | 0ms |
| ✔️ | properties with different circularity are not equal | 1ms |
| ✔️ | are not equal if circularity is not on the same property | 0ms |
.toBeInstanceOf()
| Result | Test | Time |
|---|---|---|
| ✔️ | passing Map {} and [Function Map] | 1ms |
| ✔️ | passing [] and [Function Array] | 1ms |
| ✔️ | passing {} and [Function A] | 0ms |
| ✔️ | passing {} and [Function B] | 0ms |
| ✔️ | passing {} and [Function B] | 1ms |
| ✔️ | passing {} and [Function anonymous] | 2ms |
| ✔️ | passing {} and [Function B] | 0ms |
| ✔️ | passing {} and [Function name() {}] | 1ms |
| ✔️ | failing "a" and [Function String] | 0ms |
| ✔️ | failing 1 and [Function Number] | 0ms |
| ✔️ | failing true and [Function Boolean] | 1ms |
| ✔️ | failing {} and [Function B] | 0ms |
| ✔️ | failing {} and [Function A] | 0ms |
| ✔️ | failing undefined and [Function String] | 2ms |
| ✔️ | failing null and [Function String] | 0ms |
| ✔️ | failing /\w+/ and [Function anonymous] | 1ms |
| ✔️ | failing {} and [Function RegExp] | 0ms |
| ✔️ | throws if constructor is not a function | 0ms |
.toBeTruthy(), .toBeFalsy()
| Result | Test | Time |
|---|---|---|
| ✔️ | does not accept arguments | 1ms |
| ✔️ | '{}' is truthy | 1ms |
| ✔️ | '[]' is truthy | 3ms |
| ✔️ | 'true' is truthy | 4ms |
| ✔️ | '1' is truthy | 1ms |
| ✔️ | '"a"' is truthy | 1ms |
| ✔️ | '0.5' is truthy | 1ms |
| ✔️ | 'Map {}' is truthy | 0ms |
| ✔️ | '[Function anonymous]' is truthy | 1ms |
| ✔️ | 'Infinity' is truthy | 0ms |
| ✔️ | '1n' is truthy | 0ms |
| ✔️ | 'false' is falsy | 0ms |
| ✔️ | 'null' is falsy | 1ms |
| ✔️ | 'NaN' is falsy | 3ms |
| ✔️ | '0' is falsy | 0ms |
| ✔️ | '""' is falsy | 1ms |
| ✔️ | 'undefined' is falsy | 1ms |
| ✔️ | '0n' is falsy | 2ms |
.toBeNaN()
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect(NaN).toBeNaN() | 1ms |
| ✔️ | throws | 2ms |
.toBeNull()
| Result | Test | Time |
|---|---|---|
| ✔️ | fails for '{}' | 1ms |
| ✔️ | fails for '[]' | 0ms |
| ✔️ | fails for 'true' | 0ms |
| ✔️ | fails for '1' | 1ms |
| ✔️ | fails for '"a"' | 0ms |
| ✔️ | fails for '0.5' | 2ms |
| ✔️ | fails for 'Map {}' | 0ms |
| ✔️ | fails for '[Function anonymous]' | 1ms |
| ✔️ | fails for 'Infinity' | 0ms |
| ✔️ | fails for null with .not | 0ms |
| ✔️ | pass for null | 0ms |
.toBeDefined(), .toBeUndefined()
| Result | Test | Time |
|---|---|---|
| ✔️ | '{}' is defined | 0ms |
| ✔️ | '[]' is defined | 1ms |
| ✔️ | 'true' is defined | 0ms |
| ✔️ | '1' is defined | 1ms |
| ✔️ | '"a"' is defined | 0ms |
| ✔️ | '0.5' is defined | 0ms |
| ✔️ | 'Map {}' is defined | 1ms |
| ✔️ | '[Function anonymous]' is defined | 0ms |
| ✔️ | 'Infinity' is defined | 1ms |
| ✔️ | '1n' is defined | 1ms |
| ✔️ | undefined is undefined | 0ms |
.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual()
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect(1).toBeLessThan(2) | 0ms |
| ✔️ | {pass: false} expect(2).toBeLessThan(1) | 0ms |
| ✔️ | {pass: true} expect(2).toBeGreaterThan(1) | 0ms |
| ✔️ | {pass: false} expect(1).toBeGreaterThan(2) | 0ms |
| ✔️ | {pass: true} expect(1).toBeLessThanOrEqual(2) | 0ms |
| ✔️ | {pass: false} expect(2).toBeLessThanOrEqual(1) | 0ms |
| ✔️ | {pass: true} expect(2).toBeGreaterThanOrEqual(1) | 0ms |
| ✔️ | {pass: false} expect(1).toBeGreaterThanOrEqual(2) | 0ms |
| ✔️ | throws: [1, 2] | 2ms |
| ✔️ | {pass: true} expect(-Infinity).toBeLessThan(Infinity) | 0ms |
| ✔️ | {pass: false} expect(Infinity).toBeLessThan(-Infinity) | 0ms |
| ✔️ | {pass: true} expect(Infinity).toBeGreaterThan(-Infinity) | 0ms |
| ✔️ | {pass: false} expect(-Infinity).toBeGreaterThan(Infinity) | 0ms |
| ✔️ | {pass: true} expect(-Infinity).toBeLessThanOrEqual(Infinity) | 0ms |
| ✔️ | {pass: false} expect(Infinity).toBeLessThanOrEqual(-Infinity) | 0ms |
| ✔️ | {pass: true} expect(Infinity).toBeGreaterThanOrEqual(-Infinity) | 0ms |
| ✔️ | {pass: false} expect(-Infinity).toBeGreaterThanOrEqual(Infinity) | 0ms |
| ✔️ | throws: [-Infinity, Infinity] | 1ms |
| ✔️ | {pass: true} expect(5e-324).toBeLessThan(1.7976931348623157e+308) | 0ms |
| ✔️ | {pass: false} expect(1.7976931348623157e+308).toBeLessThan(5e-324) | 0ms |
| ✔️ | {pass: true} expect(1.7976931348623157e+308).toBeGreaterThan(5e-324) | 0ms |
| ✔️ | {pass: false} expect(5e-324).toBeGreaterThan(1.7976931348623157e+308) | 0ms |
| ✔️ | {pass: true} expect(5e-324).toBeLessThanOrEqual(1.7976931348623157e+308) | 0ms |
| ✔️ | {pass: false} expect(1.7976931348623157e+308).toBeLessThanOrEqual(5e-324) | 0ms |
| ✔️ | {pass: true} expect(1.7976931348623157e+308).toBeGreaterThanOrEqual(5e-324) | 0ms |
| ✔️ | {pass: false} expect(5e-324).toBeGreaterThanOrEqual(1.7976931348623157e+308) | 0ms |
| ✔️ | throws: [5e-324, 1.7976931348623157e+308] | 1ms |
| ✔️ | {pass: true} expect(17).toBeLessThan(34) | 0ms |
| ✔️ | {pass: false} expect(34).toBeLessThan(17) | 0ms |
| ✔️ | {pass: true} expect(34).toBeGreaterThan(17) | 0ms |
| ✔️ | {pass: false} expect(17).toBeGreaterThan(34) | 0ms |
| ✔️ | {pass: true} expect(17).toBeLessThanOrEqual(34) | 1ms |
| ✔️ | {pass: false} expect(34).toBeLessThanOrEqual(17) | 0ms |
| ✔️ | {pass: true} expect(34).toBeGreaterThanOrEqual(17) | 0ms |
| ✔️ | {pass: false} expect(17).toBeGreaterThanOrEqual(34) | 0ms |
| ✔️ | throws: [17, 34] | 3ms |
| ✔️ | {pass: true} expect(3).toBeLessThan(7) | 0ms |
| ✔️ | {pass: false} expect(7).toBeLessThan(3) | 0ms |
| ✔️ | {pass: true} expect(7).toBeGreaterThan(3) | 1ms |
| ✔️ | {pass: false} expect(3).toBeGreaterThan(7) | 0ms |
| ✔️ | {pass: true} expect(3).toBeLessThanOrEqual(7) | 0ms |
| ✔️ | {pass: false} expect(7).toBeLessThanOrEqual(3) | 0ms |
| ✔️ | {pass: true} expect(7).toBeGreaterThanOrEqual(3) | 0ms |
| ✔️ | {pass: false} expect(3).toBeGreaterThanOrEqual(7) | 0ms |
| ✔️ | throws: [3, 7] | 2ms |
| ✔️ | {pass: true} expect(9).toBeLessThan(18) | 0ms |
| ✔️ | {pass: false} expect(18).toBeLessThan(9) | 0ms |
| ✔️ | {pass: true} expect(18).toBeGreaterThan(9) | 0ms |
| ✔️ | {pass: false} expect(9).toBeGreaterThan(18) | 0ms |
| ✔️ | {pass: true} expect(9).toBeLessThanOrEqual(18) | 0ms |
| ✔️ | {pass: false} expect(18).toBeLessThanOrEqual(9) | 0ms |
| ✔️ | {pass: true} expect(18).toBeGreaterThanOrEqual(9) | 0ms |
| ✔️ | {pass: false} expect(9).toBeGreaterThanOrEqual(18) | 0ms |
| ✔️ | throws: [9, 18] | 1ms |
| ✔️ | {pass: true} expect(0.1).toBeLessThan(0.2) | 0ms |
| ✔️ | {pass: false} expect(0.2).toBeLessThan(0.1) | 0ms |
| ✔️ | {pass: true} expect(0.2).toBeGreaterThan(0.1) | 0ms |
| ✔️ | {pass: false} expect(0.1).toBeGreaterThan(0.2) | 0ms |
| ✔️ | {pass: true} expect(0.1).toBeLessThanOrEqual(0.2) | 0ms |
| ✔️ | {pass: false} expect(0.2).toBeLessThanOrEqual(0.1) | 0ms |
| ✔️ | {pass: true} expect(0.2).toBeGreaterThanOrEqual(0.1) | 0ms |
| ✔️ | {pass: false} expect(0.1).toBeGreaterThanOrEqual(0.2) | 0ms |
| ✔️ | throws: [0.1, 0.2] | 1ms |
| ✔️ | can compare BigInt to Numbers | 0ms |
| ✔️ | {pass: true} expect(1n).toBeLessThan(2n) | 1ms |
| ✔️ | {pass: false} expect(2n).toBeLessThan(1n) | 0ms |
| ✔️ | {pass: true} expect(2n).toBeGreaterThan(1n) | 0ms |
| ✔️ | {pass: false} expect(1n).toBeGreaterThan(2n) | 0ms |
| ✔️ | {pass: true} expect(1n).toBeLessThanOrEqual(2n) | 0ms |
| ✔️ | {pass: false} expect(2n).toBeLessThanOrEqual(1n) | 0ms |
| ✔️ | {pass: true} expect(2n).toBeGreaterThanOrEqual(1n) | 0ms |
| ✔️ | {pass: false} expect(1n).toBeGreaterThanOrEqual(2n) | 0ms |
| ✔️ | throws: [1n, 2n] | 2ms |
| ✔️ | {pass: true} expect(17n).toBeLessThan(34n) | 0ms |
| ✔️ | {pass: false} expect(34n).toBeLessThan(17n) | 0ms |
| ✔️ | {pass: true} expect(34n).toBeGreaterThan(17n) | 0ms |
| ✔️ | {pass: false} expect(17n).toBeGreaterThan(34n) | 0ms |
| ✔️ | {pass: true} expect(17n).toBeLessThanOrEqual(34n) | 0ms |
| ✔️ | {pass: false} expect(34n).toBeLessThanOrEqual(17n) | 0ms |
| ✔️ | {pass: true} expect(34n).toBeGreaterThanOrEqual(17n) | 0ms |
| ✔️ | {pass: false} expect(17n).toBeGreaterThanOrEqual(34n) | 0ms |
| ✔️ | throws: [17n, 34n] | 3ms |
| ✔️ | {pass: true} expect(-1).toBeLessThan(2n) | 0ms |
| ✔️ | {pass: false} expect(2n).toBeLessThan(-1) | 0ms |
| ✔️ | {pass: true} expect(2n).toBeGreaterThan(-1) | 0ms |
| ✔️ | {pass: false} expect(-1).toBeGreaterThan(2n) | 0ms |
| ✔️ | {pass: true} expect(-1).toBeLessThanOrEqual(2n) | 0ms |
| ✔️ | {pass: false} expect(2n).toBeLessThanOrEqual(-1) | 0ms |
| ✔️ | {pass: true} expect(2n).toBeGreaterThanOrEqual(-1) | 0ms |
| ✔️ | {pass: false} expect(-1).toBeGreaterThanOrEqual(2n) | 0ms |
| ✔️ | throws: [-1, 2n] | 2ms |
| ✔️ | equal numbers: [1, 1] | 1ms |
| ✔️ | equal numbers: [5e-324, 5e-324] | 8ms |
| ✔️ | equal numbers: [1.7976931348623157e+308, 1.7976931348623157e+308] | 1ms |
| ✔️ | equal numbers: [Infinity, Infinity] | 0ms |
| ✔️ | equal numbers: [-Infinity, -Infinity] | 1ms |
| ✔️ | equal numbers: [1, 1] | 1ms |
| ✔️ | equal numbers: [9007199254740991, 9007199254740991] | 0ms |
.toContain(), .toContainEqual()
| Result | Test | Time |
|---|---|---|
| ✔️ | iterable | 1ms |
| ✔️ | '[1, 2, 3, 4]' contains '1' | 0ms |
| ✔️ | '["a", "b", "c", "d"]' contains '"a"' | 1ms |
| ✔️ | '[undefined, null]' contains 'null' | 0ms |
| ✔️ | '[undefined, null]' contains 'undefined' | 0ms |
| ✔️ | '[Symbol(a)]' contains 'Symbol(a)' | 1ms |
| ✔️ | '"abcdef"' contains '"abc"' | 0ms |
| ✔️ | '"11112111"' contains '"2"' | 1ms |
| ✔️ | 'Set {"abc", "def"}' contains '"abc"' | 0ms |
| ✔️ | '[0, 1]' contains '1' | 0ms |
| ✔️ | '[1n, 2n, 3n, 4n]' contains '1n' | 1ms |
| ✔️ | '[1, 2, 3, 3n, 4]' contains '3n' | 0ms |
| ✔️ | '[1, 2, 3]' does not contain '4' | 1ms |
| ✔️ | '[null, undefined]' does not contain '1' | 0ms |
| ✔️ | '[{}, []]' does not contain '[]' | 1ms |
| ✔️ | '[{}, []]' does not contain '{}' | 0ms |
| ✔️ | '[1n, 2n, 3n]' does not contain '3' | 1ms |
| ✔️ | error cases | 1ms |
| ✔️ | '[1, 2, 3, 4]' contains a value equal to '1' | 0ms |
| ✔️ | '["a", "b", "c", "d"]' contains a value equal to '"a"' | 0ms |
| ✔️ | '[undefined, null]' contains a value equal to 'null' | 1ms |
| ✔️ | '[undefined, null]' contains a value equal to 'undefined' | 0ms |
| ✔️ | '[Symbol(a)]' contains a value equal to 'Symbol(a)' | 0ms |
| ✔️ | '[{"a": "b"}, {"a": "c"}]' contains a value equal to '{"a": "b"}' | 1ms |
| ✔️ | 'Set {1, 2, 3, 4}' contains a value equal to '1' | 1ms |
| ✔️ | '[0, 1]' contains a value equal to '1' | 0ms |
| ✔️ | '[{"a": "b"}, {"a": "c"}]' does not contain a value equal to'{"a": "d"}' | 2ms |
| ✔️ | error cases for toContainEqual | 1ms |
.toBeCloseTo
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect(0).toBeCloseTo(0) | 0ms |
| ✔️ | {pass: true} expect(0).toBeCloseTo(0.001) | 0ms |
| ✔️ | {pass: true} expect(1.23).toBeCloseTo(1.229) | 0ms |
| ✔️ | {pass: true} expect(1.23).toBeCloseTo(1.226) | 1ms |
| ✔️ | {pass: true} expect(1.23).toBeCloseTo(1.225) | 0ms |
| ✔️ | {pass: true} expect(1.23).toBeCloseTo(1.234) | 0ms |
| ✔️ | {pass: true} expect(Infinity).toBeCloseTo(Infinity) | 1ms |
| ✔️ | {pass: true} expect(-Infinity).toBeCloseTo(-Infinity) | 3ms |
| ✔️ | {pass: false} expect(0).toBeCloseTo(0.01) | 1ms |
| ✔️ | {pass: false} expect(1).toBeCloseTo(1.23) | 0ms |
| ✔️ | {pass: false} expect(1.23).toBeCloseTo(1.2249999) | 1ms |
| ✔️ | {pass: false} expect(Infinity).toBeCloseTo(-Infinity) | 0ms |
| ✔️ | {pass: false} expect(Infinity).toBeCloseTo(1.23) | 0ms |
| ✔️ | {pass: false} expect(-Infinity).toBeCloseTo(-1.23) | 1ms |
| ✔️ | {pass: false} expect(3.141592e-7).toBeCloseTo(3e-7, 8) | 0ms |
| ✔️ | {pass: false} expect(56789).toBeCloseTo(51234, -4) | 0ms |
| ✔️ | {pass: true} expect(0).toBeCloseTo(0.1, 0) | 1ms |
| ✔️ | {pass: true} expect(0).toBeCloseTo(0.0001, 3) | 0ms |
| ✔️ | {pass: true} expect(0).toBeCloseTo(0.000004, 5) | 0ms |
| ✔️ | {pass: true} expect(2.0000002).toBeCloseTo(2, 5) | 1ms |
.toBeCloseTo throws: Matcher error
| Result | Test | Time |
|---|---|---|
| ✔️ | promise empty isNot false received | 0ms |
| ✔️ | promise empty isNot true expected | 0ms |
| ✔️ | promise rejects isNot false expected | 1ms |
| ✔️ | promise rejects isNot true received | 0ms |
| ✔️ | promise resolves isNot false received | 0ms |
| ✔️ | promise resolves isNot true expected | 0ms |
.toMatch()
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect(foo).toMatch(foo) | 0ms |
| ✔️ | {pass: true} expect(Foo bar).toMatch(/^foo/i) | 0ms |
| ✔️ | throws: [bar, foo] | 0ms |
| ✔️ | throws: [bar, /foo/] | 1ms |
| ✔️ | throws if non String actual value passed: [1, "foo"] | 0ms |
| ✔️ | throws if non String actual value passed: [{}, "foo"] | 0ms |
| ✔️ | throws if non String actual value passed: [[], "foo"] | 0ms |
| ✔️ | throws if non String actual value passed: [true, "foo"] | 0ms |
| ✔️ | throws if non String actual value passed: [/foo/i, "foo"] | 0ms |
| ✔️ | throws if non String actual value passed: [[Function anonymous], "foo"] | 0ms |
| ✔️ | throws if non String actual value passed: [undefined, "foo"] | 1ms |
| ✔️ | throws if non String/RegExp expected value passed: ["foo", 1] | 0ms |
| ✔️ | throws if non String/RegExp expected value passed: ["foo", {}] | 0ms |
| ✔️ | throws if non String/RegExp expected value passed: ["foo", []] | 0ms |
| ✔️ | throws if non String/RegExp expected value passed: ["foo", true] | 1ms |
| ✔️ | throws if non String/RegExp expected value passed: ["foo", [Function anonymous]] | 0ms |
| ✔️ | throws if non String/RegExp expected value passed: ["foo", undefined] | 0ms |
| ✔️ | escapes strings properly | 1ms |
| ✔️ | does not maintain RegExp state between calls | 0ms |
.toHaveLength
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect([1, 2]).toHaveLength(2) | 1ms |
| ✔️ | {pass: true} expect([]).toHaveLength(0) | 0ms |
| ✔️ | {pass: true} expect(["a", "b"]).toHaveLength(2) | 0ms |
| ✔️ | {pass: true} expect("abc").toHaveLength(3) | 1ms |
| ✔️ | {pass: true} expect("").toHaveLength(0) | 0ms |
| ✔️ | {pass: true} expect([Function anonymous]).toHaveLength(0) | 0ms |
| ✔️ | {pass: false} expect([1, 2]).toHaveLength(3) | 1ms |
| ✔️ | {pass: false} expect([]).toHaveLength(1) | 0ms |
| ✔️ | {pass: false} expect(["a", "b"]).toHaveLength(99) | 1ms |
| ✔️ | {pass: false} expect("abc").toHaveLength(66) | 0ms |
| ✔️ | {pass: false} expect("").toHaveLength(1) | 1ms |
| ✔️ | error cases | 1ms |
.toHaveLength matcher error expected length
| Result | Test | Time |
|---|---|---|
| ✔️ | not number | 0ms |
| ✔️ | number Infinity | 1ms |
| ✔️ | number NaN | 0ms |
| ✔️ | number float | 0ms |
| ✔️ | number negative integer | 1ms |
.toHaveProperty()
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 1) | 1ms |
| ✔️ | {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d', 1) | 0ms |
| ✔️ | {pass: true} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 1) | 0ms |
| ✔️ | {pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1', 2) | 0ms |
| ✔️ | {pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1', Any) | 0ms |
| ✔️ | {pass: true} expect({"a": 0}).toHaveProperty('a', 0) | 1ms |
| ✔️ | {pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b', undefined) | 0ms |
| ✔️ | {pass: true} expect({"a": {}}).toHaveProperty('a.b', undefined) | 1ms |
| ✔️ | {pass: true} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 5}) | 2ms |
| ✔️ | {pass: true} expect({"property": 1}).toHaveProperty('property', 1) | 0ms |
| ✔️ | {pass: true} expect({}).toHaveProperty('a', undefined) | 1ms |
| ✔️ | {pass: true} expect({}).toHaveProperty('b', "b") | 0ms |
| ✔️ | {pass: true} expect({}).toHaveProperty('setter', undefined) | 0ms |
| ✔️ | {pass: true} expect({"val": true}).toHaveProperty('a', undefined) | 0ms |
| ✔️ | {pass: true} expect({"val": true}).toHaveProperty('c', "c") | 0ms |
| ✔️ | {pass: true} expect({"val": true}).toHaveProperty('val', true) | 1ms |
| ✔️ | {pass: true} expect({"nodeName": "DIV"}).toHaveProperty('nodeType', 1) | 0ms |
| ✔️ | {pass: true} expect("").toHaveProperty('length', 0) | 0ms |
| ✔️ | {pass: true} expect([Function memoized]).toHaveProperty('memo', []) | 1ms |
| ✔️ | {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.ttt.d', 1) | 0ms |
| ✔️ | {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 2) | 1ms |
| ✔️ | {pass: false} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 2) | 2ms |
| ✔️ | {pass: false} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 2) | 0ms |
| ✔️ | {pass: false} expect({"children": [""That cartoon""], "props": null, "type": "p"}).toHaveProperty('children,0', ""That cat cartoon"") | 1ms |
| ✔️ | {pass: false} expect({"children": ["Roses are red. | |
| Violets are blue. | ||
| Testing with Jest is good for you."], "props": null, "type": "pre"}).toHaveProperty('children,0', "Roses are red, violets are blue. | ||
| Testing with Jest | ||
| Is good for you.") | 1ms | |
| ✔️ | {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d', 2) | 0ms |
| ✔️ | {pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d', 1) | 0ms |
| ✔️ | {pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d', 5) | 0ms |
| ✔️ | {pass: false} expect({}).toHaveProperty('a', "test") | 0ms |
| ✔️ | {pass: false} expect({"a": {"b": 3}}).toHaveProperty('a.b', undefined) | 1ms |
| ✔️ | {pass: false} expect(1).toHaveProperty('a.b.c', "test") | 0ms |
| ✔️ | {pass: false} expect("abc").toHaveProperty('a.b.c', {"a": 5}) | 1ms |
| ✔️ | {pass: false} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 4}) | 0ms |
| ✔️ | {pass: false} expect({}).toHaveProperty('a', "a") | 1ms |
| ✔️ | {pass: false} expect({}).toHaveProperty('b', undefined) | 0ms |
| ✔️ | {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d') | 0ms |
| ✔️ | {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d') | 1ms |
| ✔️ | {pass: true} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d') | 0ms |
| ✔️ | {pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1') | 0ms |
| ✔️ | {pass: true} expect({"a": 0}).toHaveProperty('a') | 0ms |
| ✔️ | {pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b') | 0ms |
| ✔️ | {pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d') | 1ms |
| ✔️ | {pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d') | 0ms |
| ✔️ | {pass: false} expect({}).toHaveProperty('a') | 0ms |
| ✔️ | {pass: false} expect(1).toHaveProperty('a.b.c') | 1ms |
| ✔️ | {pass: false} expect("abc").toHaveProperty('a.b.c') | 0ms |
| ✔️ | {pass: false} expect(false).toHaveProperty('key') | 0ms |
| ✔️ | {pass: false} expect(0).toHaveProperty('key') | 0ms |
| ✔️ | {pass: false} expect("").toHaveProperty('key') | 0ms |
| ✔️ | {pass: false} expect(Symbol()).toHaveProperty('key') | 1ms |
| ✔️ | {pass: false} expect({"key": 1}).toHaveProperty('not') | 0ms |
| ✔️ | {error} expect(null).toHaveProperty('a.b') | 0ms |
| ✔️ | {error} expect(undefined).toHaveProperty('a') | 1ms |
| ✔️ | {error} expect({"a": {"b": {}}}).toHaveProperty('undefined') | 0ms |
| ✔️ | {error} expect({"a": {"b": {}}}).toHaveProperty('null') | 0ms |
| ✔️ | {error} expect({"a": {"b": {}}}).toHaveProperty('1') | 0ms |
| ✔️ | {error} expect({}).toHaveProperty('') | 1ms |
toMatchObject() circular references simple circular references
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect({"a": "hello", "ref": [Circular]}).toMatchObject({}) | 3ms |
| ✔️ | {pass: true} expect({"a": "hello", "ref": [Circular]}).toMatchObject({"a": "hello", "ref": [Circular]}) | 0ms |
| ✔️ | {pass: false} expect({}).toMatchObject({"a": "hello", "ref": [Circular]}) | 1ms |
| ✔️ | {pass: false} expect({"a": "hello", "ref": [Circular]}).toMatchObject({"a": "world", "ref": [Circular]}) | 0ms |
| ✔️ | {pass: false} expect({"ref": "not a ref"}).toMatchObject({"a": "hello", "ref": [Circular]}) | 1ms |
toMatchObject() circular references transitive circular references
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect({"a": "hello", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({}) | 0ms |
| ✔️ | {pass: true} expect({"a": "hello", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) | 1ms |
| ✔️ | {pass: false} expect({}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) | 0ms |
| ✔️ | {pass: false} expect({"a": "world", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) | 0ms |
| ✔️ | {pass: false} expect({"nestedObj": {"parentObj": "not the parent ref"}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) | 1ms |
toMatchObject()
| Result | Test | Time |
|---|---|---|
| ✔️ | {pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b"}) | 1ms |
| ✔️ | {pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b", "c": "d"}) | 1ms |
| ✔️ | {pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": "z"}}) | 0ms |
| ✔️ | {pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"x": {"r": "r"}}}) | 0ms |
| ✔️ | {pass: true} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5]}) | 1ms |
| ✔️ | {pass: true} expect({"a": [3, 4, 5, "v"], "b": "b"}).toMatchObject({"a": [3, 4, 5, "v"]}) | 0ms |
| ✔️ | {pass: true} expect({"a": 1, "c": 2}).toMatchObject({"a": Any}) | 1ms |
| ✔️ | {pass: true} expect({"a": {"x": "x", "y": "y"}}).toMatchObject({"a": {"x": Any}}) | 0ms |
| ✔️ | {pass: true} expect(Set {1, 2}).toMatchObject(Set {1, 2}) | 1ms |
| ✔️ | {pass: true} expect(Set {1, 2}).toMatchObject(Set {2, 1}) | 0ms |
| ✔️ | {pass: true} expect(2015-11-30T00:00:00.000Z).toMatchObject(2015-11-30T00:00:00.000Z) | 1ms |
| ✔️ | {pass: true} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-11-30T00:00:00.000Z}) | 0ms |
| ✔️ | {pass: true} expect({"a": null, "b": "b"}).toMatchObject({"a": null}) | 2ms |
| ✔️ | {pass: true} expect({"a": undefined, "b": "b"}).toMatchObject({"a": undefined}) | 0ms |
| ✔️ | {pass: true} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "a"}]}) | 1ms |
| ✔️ | {pass: true} expect([1, 2]).toMatchObject([1, 2]) | 0ms |
| ✔️ | {pass: true} expect({"a": undefined}).toMatchObject({"a": undefined}) | 1ms |
| ✔️ | {pass: true} expect([]).toMatchObject([]) | 0ms |
| ✔️ | {pass: true} expect([Error: foo]).toMatchObject([Error: foo]) | 0ms |
| ✔️ | {pass: true} expect([Error: bar]).toMatchObject({"message": "bar"}) | 1ms |
| ✔️ | {pass: true} expect({}).toMatchObject({"a": undefined, "b": "b"}) | 0ms |
| ✔️ | {pass: true} expect({"a": "b"}).toMatchObject({"a": "b"}) | 1ms |
| ✔️ | {pass: true} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "b", Symbol(jest): "jest"}) | 0ms |
| ✔️ | {pass: true} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "b", "c": "d", Symbol(jest): "jest"}) | 1ms |
| ✔️ | {pass: true} expect({}).toMatchObject({"a": undefined, "b": "b", "c": "c"}) | 0ms |
| ✔️ | {pass: true} expect({}).toMatchObject({"d": 4}) | 1ms |
| ✔️ | {pass: true} expect({"a": "b", "toString": [Function toString]}).toMatchObject({"toString": Any}) | 0ms |
| ✔️ | {pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"e": "b"}) | 1ms |
| ✔️ | {pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b!", "c": "d"}) | 0ms |
| ✔️ | {pass: false} expect({"a": "a", "c": "d"}).toMatchObject({"a": Any}) | 1ms |
| ✔️ | {pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": [3]}}) | 1ms |
| ✔️ | {pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"l": {"r": "r"}}}) | 2ms |
| ✔️ | {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5, 6]}) | 0ms |
| ✔️ | {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4]}) | 1ms |
| ✔️ | {pass: false} expect({"a": [3, 4, "v"], "b": "b"}).toMatchObject({"a": ["v"]}) | 0ms |
| ✔️ | {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": 4}}) | 0ms |
| ✔️ | {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": Any}}) | 1ms |
| ✔️ | {pass: false} expect([1, 2]).toMatchObject([1, 3]) | 2ms |
| ✔️ | {pass: false} expect([0]).toMatchObject([-0]) | 1ms |
| ✔️ | {pass: false} expect(Set {1, 2}).toMatchObject(Set {2}) | 1ms |
| ✔️ | {pass: false} expect(2015-11-30T00:00:00.000Z).toMatchObject(2015-10-10T00:00:00.000Z) | 0ms |
| ✔️ | {pass: false} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-10-10T00:00:00.000Z}) | 1ms |
| ✔️ | {pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": "4"}) | 0ms |
| ✔️ | {pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": undefined}) | 1ms |
| ✔️ | {pass: false} expect({"a": undefined}).toMatchObject({"a": null}) | 0ms |
| ✔️ | {pass: false} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "c"}]}) | 0ms |
| ✔️ | {pass: false} expect({"a": 1, "b": 1, "c": 1, "d": {"e": {"f": 555}}}).toMatchObject({"d": {"e": {"f": 222}}}) | 1ms |
| ✔️ | {pass: false} expect({}).toMatchObject({"a": undefined}) | 0ms |
| ✔️ | {pass: false} expect([1, 2, 3]).toMatchObject([2, 3, 1]) | 0ms |
| ✔️ | {pass: false} expect([1, 2, 3]).toMatchObject([1, 2, 2]) | 0ms |
| ✔️ | {pass: false} expect([Error: foo]).toMatchObject([Error: bar]) | 0ms |
| ✔️ | {pass: false} expect({"a": "b"}).toMatchObject({"c": "d"}) | 4ms |
| ✔️ | {pass: false} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "c", Symbol(jest): Any}) | 1ms |
| ✔️ | {pass: false} expect({"a": "b"}).toMatchObject({"toString": Any}) | 0ms |
| ✔️ | throws expect(null).toMatchObject({}) | 0ms |
| ✔️ | throws expect(4).toMatchObject({}) | 0ms |
| ✔️ | throws expect("44").toMatchObject({}) | 0ms |
| ✔️ | throws expect(true).toMatchObject({}) | 3ms |
| ✔️ | throws expect(undefined).toMatchObject({}) | 0ms |
| ✔️ | throws expect({}).toMatchObject(null) | 0ms |
| ✔️ | throws expect({}).toMatchObject(4) | 0ms |
| ✔️ | throws expect({}).toMatchObject("some string") | 0ms |
| ✔️ | throws expect({}).toMatchObject(true) | 7ms |
| ✔️ | throws expect({}).toMatchObject(undefined) | 0ms |
| ✔️ | does not match properties up in the prototype chain | 1ms |
e2e/tests/jestRequireActual.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | understands dependencies using jest.requireActual | 1614ms |
packages/jest-core/src/tests/watch.test.js ✔️
Watch mode flows
| Result | Test | Time |
|---|---|---|
| ✔️ | Correctly passing test path pattern | 582ms |
| ✔️ | Correctly passing test name pattern | 73ms |
| ✔️ | Runs Jest once by default and shows usage | 60ms |
| ✔️ | Runs Jest in a non-interactive environment not showing usage | 125ms |
| ✔️ | resolves relative to the package root | 77ms |
| ✔️ | shows prompts for WatchPlugins in alphabetical order | 72ms |
| ✔️ | shows update snapshot prompt (without interactive) | 57ms |
| ✔️ | shows update snapshot prompt (with interactive) | 60ms |
| ✔️ | allows WatchPlugins to hook into JestHook | 69ms |
| ✔️ | allows WatchPlugins to override eligible internal plugins | 61ms |
| ✔️ | allows WatchPlugins to be configured | 70ms |
| ✔️ | allows WatchPlugins to hook into file system changes | 68ms |
| ✔️ | makes watch plugin initialization errors look nice | 104ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 114ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 72ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 174ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 63ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 66ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 68ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 64ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 62ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 60ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 70ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 61ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 64ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 63ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 71ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 76ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 66ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 78ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 57ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 68ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 52ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 58ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 62ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 73ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 69ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 61ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 70ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 66ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 65ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 110ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 84ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 69ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 78ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 87ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 93ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 82ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 131ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 248ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 77ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 64ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 86ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 72ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 74ms |
| ✔️ | allows WatchPlugins to modify only white-listed global config keys | 60ms |
| ✔️ | triggers enter on a WatchPlugin when its key is pressed | 73ms |
| ✔️ | prevents Jest from handling keys when active and returns control when end is called | 68ms |
| ✔️ | Pressing "o" runs test in "only changed files" mode | 69ms |
| ✔️ | Pressing "a" runs test in "watch all" mode | 62ms |
| ✔️ | Pressing "ENTER" reruns the tests | 108ms |
| ✔️ | Pressing "t" reruns the tests in "test name pattern" mode | 93ms |
| ✔️ | Pressing "p" reruns the tests in "filename pattern" mode | 80ms |
| ✔️ | Can combine "p" and "t" filters | 68ms |
| ✔️ | Pressing "u" reruns the tests in "update snapshot" mode | 67ms |
| ✔️ | passWithNoTest should be set to true in watch mode | 65ms |
| ✔️ | shows the correct usage for the f key in "only failed tests" mode | 62ms |
Watch mode flows when dealing with potential watch plugin key conflicts
| Result | Test | Time |
|---|---|---|
| ✔️ | forbids WatchPlugins overriding reserved internal plugins | 70ms |
| ✔️ | forbids WatchPlugins overriding reserved internal plugins | 58ms |
| ✔️ | forbids WatchPlugins overriding reserved internal plugins | 62ms |
| ✔️ | allows WatchPlugins to override non-reserved internal plugins | 68ms |
| ✔️ | allows WatchPlugins to override non-reserved internal plugins | 62ms |
| ✔️ | forbids third-party WatchPlugins overriding each other | 78ms |
packages/jest-runtime/src/tests/runtime_require_module_or_mock_transitive_deps.test.js ✔️
transitive dependencies
| Result | Test | Time |
|---|---|---|
| ✔️ | mocks a manually mocked and mapped module | 618ms |
| ✔️ | unmocks transitive dependencies in node_modules by default | 357ms |
| ✔️ | unmocks transitive dependencies in node_modules when using unmock | 360ms |
| ✔️ | unmocks transitive dependencies in node_modules by default when using both patterns and unmock | 415ms |
| ✔️ | mocks deep dependencies when using unmock | 299ms |
| ✔️ | does not mock deep dependencies when using deepUnmock | 258ms |
packages/jest-core/src/tests/watchFileChanges.test.ts ✔️
Watch mode flows with changed files
| Result | Test | Time |
|---|---|---|
| ✔️ | should correct require new files without legacy cache | 1430ms |
packages/jest-haste-map/src/tests/index.test.js ✔️
HasteMap
| Result | Test | Time |
|---|---|---|
| ✔️ | exports constants | 272ms |
| ✔️ | creates valid cache file paths | 9ms |
| ✔️ | creates different cache file paths for different roots | 9ms |
| ✔️ | creates different cache file paths for different dependency extractor cache keys | 14ms |
| ✔️ | creates different cache file paths for different hasteImplModulePath cache keys | 10ms |
| ✔️ | creates different cache file paths for different projects | 22ms |
| ✔️ | matches files against a pattern | 10ms |
| ✔️ | ignores files given a pattern | 6ms |
| ✔️ | ignores vcs directories without ignore pattern | 6ms |
| ✔️ | ignores vcs directories with ignore pattern regex | 5ms |
| ✔️ | warn on ignore pattern except for regex | 6ms |
| ✔️ | builds a haste map on a fresh cache | 7ms |
| ✔️ | does not crawl native files even if requested to do so | 5ms |
| ✔️ | retains all files if retainAllFiles is specified |
9ms |
| ✔️ | warns on duplicate mock files | 5ms |
| ✔️ | warns on duplicate module ids | 6ms |
| ✔️ | warns on duplicate module ids only once | 5ms |
| ✔️ | throws on duplicate module ids if "throwOnModuleCollision" is set to true | 5ms |
| ✔️ | splits up modules by platform | 5ms |
| ✔️ | does not access the file system on a warm cache with no changes | 11ms |
| ✔️ | only does minimal file system access when files change | 6ms |
| ✔️ | correctly handles file deletions | 6ms |
| ✔️ | correctly handles platform-specific file additions | 8ms |
| ✔️ | correctly handles platform-specific file deletions | 5ms |
| ✔️ | correctly handles platform-specific file renames | 5ms |
| ✔️ | discards the cache when configuration changes | 6ms |
| ✔️ | ignores files that do not exist | 53ms |
| ✔️ | distributes work across workers | 5ms |
| ✔️ | tries to crawl using node as a fallback | 7ms |
| ✔️ | tries to crawl using node as a fallback when promise fails once | 10ms |
| ✔️ | stops crawling when both crawlers fail | 5ms |
HasteMap builds a haste map on a fresh cache with SHA-1s
| Result | Test | Time |
|---|---|---|
| ✔️ | uses watchman: false | 6ms |
| ✔️ | uses watchman: true | 15ms |
HasteMap duplicate modules
| Result | Test | Time |
|---|---|---|
| ✔️ | recovers when a duplicate file is deleted | 6ms |
| ✔️ | recovers with the correct type when a duplicate file is deleted | 6ms |
| ✔️ | recovers when a duplicate module is renamed | 12ms |
HasteMap file system changes processing
| Result | Test | Time |
|---|---|---|
| ✔️ | provides a new set of hasteHS and moduleMap | 41ms |
| ✔️ | handles several change events at once | 35ms |
| ✔️ | does not emit duplicate change events | 43ms |
| ✔️ | emits a change even if a file in node_modules has changed | 36ms |
| ✔️ | correctly tracks changes to both platform-specific versions of a single module name | 35ms |
HasteMap file system changes processing recovery from duplicate module IDs
| Result | Test | Time |
|---|---|---|
| ✔️ | recovers when the oldest version of the duplicates is fixed | 66ms |
| ✔️ | recovers when the most recent duplicate is fixed | 90ms |
| ✔️ | ignore directories | 37ms |
e2e/tests/coverageHandlebars.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | code coverage for Handlebars | 1830ms |
e2e/tests/compareDomNodes.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not crash when expect involving a DOM node fails | 1355ms |
e2e/tests/jestEnvironmentJsdom.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | check is not leaking memory | 1702ms |
e2e/tests/resolve.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | resolve platform modules | 1764ms |
e2e/tests/snapshot.test.ts ✔️
Snapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | stores new snapshots on the first run | 959ms |
| ✔️ | works with escaped characters | 2154ms |
| ✔️ | works with escaped regex | 1375ms |
| ✔️ | works with template literal substitutions | 1520ms |
Snapshot Validation
| Result | Test | Time |
|---|---|---|
| ✔️ | does not save snapshots in CI mode by default | 890ms |
| ✔️ | works on subsequent runs without -u |
1752ms |
| ✔️ | deletes the snapshot if the test suite has been removed | 1549ms |
| ✔️ | deletes a snapshot when a test does removes all the snapshots | 1766ms |
| ✔️ | updates the snapshot when a test removes some snapshots | 1800ms |
packages/jest-runtime/src/tests/runtime_require_module_or_mock.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | mocks modules by default when using automocking | 338ms |
| ✔️ | doesn't mock modules when explicitly unmocked when using automocking | 100ms |
| ✔️ | doesn't mock modules when explicitly unmocked via a different name | 45ms |
| ✔️ | doesn't mock modules when disableAutomock() has been called | 90ms |
| ✔️ | uses manual mock when automocking on and mock is available | 29ms |
| ✔️ | does not use manual mock when automocking is off and a real module is available | 20ms |
| ✔️ | resolves mapped module names and unmocks them by default | 88ms |
| ✔️ | automocking is disabled by default | 21ms |
| ✔️ | unmocks modules in config.unmockedModulePathPatterns for tests with automock enabled when automock is false | 96ms |
| ✔️ | unmocks virtual mocks after they have been mocked previously | 116ms |
resetModules
| Result | Test | Time |
|---|---|---|
| ✔️ | resets all the modules | 22ms |
isolateModules
| Result | Test | Time |
|---|---|---|
| ✔️ | keeps it's registry isolated from global one | 22ms |
| ✔️ | resets all modules after the block | 26ms |
| ✔️ | resets module after failing | 48ms |
| ✔️ | cannot nest isolateModules blocks | 50ms |
| ✔️ | can call resetModules within a isolateModules block | 25ms |
isolateModules can use isolateModules from a beforeEach block
| Result | Test | Time |
|---|---|---|
| ✔️ | can use the required module from beforeEach and re-require it | 9ms |
packages/jest-runtime/src/tests/runtime_require_mock.test.js ✔️
Runtime requireMock
| Result | Test | Time |
|---|---|---|
| ✔️ | uses manual mocks before attempting to automock | 281ms |
| ✔️ | can resolve modules that are only referenced from mocks | 38ms |
| ✔️ | stores and re-uses manual mock exports | 36ms |
| ✔️ | automocks haste modules without a manual mock | 77ms |
| ✔️ | automocks relative-path modules without a file extension | 43ms |
| ✔️ | automocks relative-path modules with a file extension | 36ms |
| ✔️ | just falls back when loading a native module | 31ms |
| ✔️ | stores and re-uses automocked haste exports | 31ms |
| ✔️ | stores and re-uses automocked relative-path modules | 102ms |
| ✔️ | multiple node core modules returns correct module | 74ms |
| ✔️ | throws on non-existent haste modules | 69ms |
| ✔️ | uses manual mocks when using a custom resolver | 49ms |
| ✔️ | provides require.main in mock |
33ms |
packages/jest-runtime/src/tests/runtime_node_path.test.js ✔️
Runtime
| Result | Test | Time |
|---|---|---|
| ✔️ | uses NODE_PATH to find modules | 303ms |
| ✔️ | uses modulePaths to find modules | 231ms |
| ✔️ | finds modules in NODE_PATH containing multiple paths | 248ms |
| ✔️ | does not find modules if NODE_PATH is relative | 260ms |
packages/jest-runtime/src/tests/runtime_require_resolve.test.ts ✔️
Runtime require.resolve
| Result | Test | Time |
|---|---|---|
| ✔️ | resolves a module path | 292ms |
| ✔️ | resolves a module path with moduleNameMapper | 74ms |
Runtime require.resolve with the jest-resolve-outside-vm-option
| Result | Test | Time |
|---|---|---|
| ✔️ | forwards to the real Node require in an internal context | 87ms |
| ✔️ | ignores the option in an external context | 127ms |
| ✔️ | does not understand a self-constructed outsideJestVmPath in an external context | 87ms |
packages/jest-leak-detector/src/tests/index.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | complains if the value is a primitive | 3ms |
| ✔️ | does not show the GC if hidden | 80ms |
| ✔️ | does not hide the GC if visible | 34ms |
| ✔️ | correctly checks simple leaks | 108ms |
| ✔️ | tests different objects | 445ms |
| ✔️ | correctly checks more complex leaks | 240ms |
e2e/tests/jasmineAsyncWithPendingDuringTest.ts ✔️
async jasmine with pending during test
| Result | Test | Time |
|---|---|---|
| ✔️ | does not work on jest-circus | 18ms |
| ✖️ | should be reported as a pending test | 0ms |
packages/jest-core/src/tests/TestScheduler.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | config for reporters supports default |
14ms |
| ✔️ | .addReporter() .removeReporter() | 1ms |
| ✔️ | schedule tests run in parallel per default | 4ms |
| ✔️ | schedule tests run in serial if the runner flags them | 1ms |
| ✔️ | should bail after n failures |
2ms |
| ✔️ | should not bail if less than n failures |
0ms |
| ✔️ | should set runInBand to run in serial | 2ms |
| ✔️ | should set runInBand to not run in serial | 2ms |
e2e/tests/expectInVm.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | expect works correctly with RegExps created inside a VM | 1477ms |
packages/jest-runtime/src/tests/runtime_require_actual.test.js ✔️
Runtime requireActual
| Result | Test | Time |
|---|---|---|
| ✔️ | requires node module when manual mock exists | 314ms |
| ✔️ | requireActual with moduleNameMapper | 51ms |
packages/jest-runtime/src/tests/runtime_require_cache.test.js ✔️
Runtime require.cache
| Result | Test | Time |
|---|---|---|
| ✔️ | require.cache returns loaded module list as native Nodejs require does | 388ms |
| ✔️ | require.cache is tolerant readonly | 31ms |
packages/jest-runtime/src/tests/runtime_module_directories.test.js ✔️
Runtime
| Result | Test | Time |
|---|---|---|
| ✔️ | uses configured moduleDirectories | 288ms |
| ✔️ | resolves packages | 47ms |
| ✔️ | finds closest module from moduleDirectories | 44ms |
| ✔️ | only checks the configured directories | 103ms |
packages/jest-runtime/src/tests/runtime_internal_module.test.js ✔️
Runtime internalModule
| Result | Test | Time |
|---|---|---|
| ✔️ | loads modules and applies transforms | 170ms |
| ✔️ | loads internal modules without applying transforms | 162ms |
| ✔️ | loads JSON modules and applies transforms | 189ms |
| ✔️ | loads internal JSON modules without applying transforms | 123ms |
packages/jest-cli/src/tests/cli/args.test.ts ✔️
check
| Result | Test | Time |
|---|---|---|
| ✔️ | returns true if the arguments are valid | 1ms |
| ✔️ | raises an exception if runInBand and maxWorkers are both specified | 23ms |
| ✔️ | raises an exception if onlyChanged and watchAll are both specified | 1ms |
| ✔️ | raises an exception if onlyFailures and watchAll are both specified | 1ms |
| ✔️ | raises an exception when lastCommit and watchAll are both specified | 0ms |
| ✔️ | raises an exception if findRelatedTests is specified with no file paths | 1ms |
| ✔️ | raises an exception if maxWorkers is specified with no number | 0ms |
| ✔️ | allows maxWorkers to be a % | 1ms |
| ✔️ | allows using "js" file for --config option | 10ms |
| ✔️ | allows using "ts" file for --config option | 0ms |
| ✔️ | allows using "mjs" file for --config option | 0ms |
| ✔️ | allows using "cjs" file for --config option | 1ms |
| ✔️ | allows using "json" file for --config option | 0ms |
| ✔️ | raises an exception if selectProjects is not provided any project names | 0ms |
| ✔️ | raises an exception if config is not a valid JSON string | 1ms |
| ✔️ | raises an exception if config is not a supported file type | 1ms |
buildArgv
| Result | Test | Time |
|---|---|---|
| ✔️ | should return only camelcased args | 14ms |
packages/jest-runtime/src/tests/runtime_jest_spy_on.test.js ✔️
Runtime jest.spyOn
| Result | Test | Time |
|---|---|---|
| ✔️ | calls the original function | 395ms |
Runtime jest.spyOnProperty
| Result | Test | Time |
|---|---|---|
| ✔️ | calls the original function | 43ms |
packages/jest-resolve-dependencies/src/tests/dependency_resolver.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | resolves no dependencies for non-existent path | 72ms |
| ✔️ | resolves dependencies for existing path | 30ms |
| ✔️ | includes the mocks of dependencies as dependencies | 67ms |
| ✔️ | resolves dependencies for scoped packages | 41ms |
| ✔️ | resolves no inverse dependencies for empty paths set | 51ms |
| ✔️ | resolves no inverse dependencies for set of non-existent paths | 41ms |
| ✔️ | resolves inverse dependencies for existing path | 27ms |
| ✔️ | resolves inverse dependencies of mock | 26ms |
| ✔️ | resolves inverse dependencies from available snapshot | 47ms |
| ✔️ | resolves dependencies correctly when dependency resolution fails | 41ms |
| ✔️ | resolves dependencies correctly when mock dependency resolution fails | 27ms |
packages/jest-message-util/src/tests/messages.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should exclude jasmine from stack trace for Unix paths. | 4ms |
| ✔️ | .formatExecError() | 0ms |
| ✔️ | formatStackTrace should strip node internals | 1ms |
| ✔️ | should not exclude vendor from stack trace | 1ms |
| ✔️ | retains message in babel code frame error | 1ms |
| ✔️ | codeframe | 3ms |
| ✔️ | no codeframe | 0ms |
| ✔️ | no stack | 1ms |
formatStackTrace
| Result | Test | Time |
|---|---|---|
| ✔️ | prints code frame and stacktrace | 1ms |
| ✔️ | does not print code frame when noCodeFrame = true | 1ms |
| ✔️ | does not print codeframe when noStackTrace = true | 0ms |
packages/jest-diff/src/tests/diff.test.ts ✔️
different types
| Result | Test | Time |
|---|---|---|
| ✔️ | '1' and 'a' | 0ms |
| ✔️ | '[object Object]' and 'a' | 1ms |
| ✔️ | '' and '2' | 0ms |
| ✔️ | 'null' and 'undefined' | 0ms |
| ✔️ | '() => {}' and '3' | 0ms |
no visual difference
| Result | Test | Time |
|---|---|---|
| ✔️ | '"a"' and '"a"' | 2ms |
| ✔️ | '{}' and '{}' | 1ms |
| ✔️ | '[]' and '[]' | 0ms |
| ✔️ | '[1,2]' and '[1,2]' | 0ms |
| ✔️ | '11' and '11' | 1ms |
| ✔️ | 'null' and 'null' | 0ms |
| ✔️ | 'null' and 'null' | 0ms |
| ✔️ | 'undefined' and 'undefined' | 0ms |
| ✔️ | 'null' and 'null' | 0ms |
| ✔️ | 'undefined' and 'undefined' | 1ms |
| ✔️ | 'false' and 'false' | 0ms |
| ✔️ | '{"a":1}' and '{"a":1}' | 0ms |
| ✔️ | '{"a":{"b":5}}' and '{"a":{"b":5}}' | 0ms |
| ✔️ | Map key order should be irrelevant | 1ms |
| ✔️ | Set value order should be irrelevant | 1ms |
| Result | Test | Time |
|---|---|---|
| ✔️ | oneline strings | 1ms |
| ✔️ | numbers | 0ms |
| ✔️ | -0 and 0 | 0ms |
| ✔️ | booleans | 0ms |
| ✔️ | collapses big diffs to patch format | 1ms |
falls back to not call toJSON if serialization has no differences
| Result | Test | Time |
|---|---|---|
| ✔️ | but then objects have differences | 1ms |
| ✔️ | and then objects have no differences | 0ms |
falls back to not call toJSON if it throws
| Result | Test | Time |
|---|---|---|
| ✔️ | and then objects have differences | 0ms |
| ✔️ | and then objects have no differences | 0ms |
multiline strings
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 1ms |
| ✔️ | (expanded) | 0ms |
objects
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
multiline string non-snapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
multiline string snapshot
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 1ms |
| ✔️ | (expanded) | 0ms |
React elements
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 1ms |
| ✔️ | (expanded) | 0ms |
multiline string as value of object property (non-snapshot)
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 1ms |
multiline string as value of object property (snapshot)
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
indentation in JavaScript structures from less to more
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 7ms |
| ✔️ | (expanded) | 1ms |
indentation in JavaScript structures from more to less
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 1ms |
color of text
| Result | Test | Time |
|---|---|---|
| ✔️ | (expanded) | 0ms |
| ✔️ | (unexpanded) | 1ms |
indentation in React elements (non-snapshot) from less to more
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
indentation in React elements (non-snapshot) from more to less
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 1ms |
indentation in React elements (snapshot) from less to more
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
indentation in React elements (snapshot) from more to less
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 1ms |
outer React element (non-snapshot) from less to more
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
outer React element (non-snapshot) from more to less
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 1ms |
trailing newline in multiline string not enclosed in quotes from less to more
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 1ms |
trailing newline in multiline string not enclosed in quotes from more to less
| Result | Test | Time |
|---|---|---|
| ✔️ | (unexpanded) | 0ms |
| ✔️ | (expanded) | 0ms |
context
| Result | Test | Time |
|---|---|---|
| ✔️ | number of lines: -1 (5 default) | 0ms |
| ✔️ | number of lines: 0 | 1ms |
| ✔️ | number of lines: 1 | 0ms |
| ✔️ | number of lines: 2 | 1ms |
| ✔️ | number of lines: 3.1 (5 default) | 0ms |
| ✔️ | number of lines: undefined (5 default) | 1ms |
diffLinesUnified edge cases
| Result | Test | Time |
|---|---|---|
| ✔️ | a empty string b empty string | 0ms |
| ✔️ | a empty string b one line | 0ms |
| ✔️ | a multiple lines b empty string | 0ms |
| ✔️ | a one line b multiple lines | 0ms |
diffLinesUnified2 edge cases
| Result | Test | Time |
|---|---|---|
| ✔️ | a empty string b empty string | 0ms |
| ✔️ | a empty string b one line | 0ms |
| ✔️ | a multiple lines b empty string | 0ms |
| ✔️ | a one line b multiple lines | 1ms |
diffLinesUnified2 edge cases lengths not equal
| Result | Test | Time |
|---|---|---|
| ✔️ | a | 0ms |
| ✔️ | b | 0ms |
diffStringsUnified edge cases
| Result | Test | Time |
|---|---|---|
| ✔️ | empty both a and b | 0ms |
| ✔️ | empty only a | 1ms |
| ✔️ | empty only b | 0ms |
| ✔️ | equal both non-empty | 2ms |
| ✔️ | multiline has no common after clean up chaff | 1ms |
| ✔️ | one-line has no common after clean up chaff | 0ms |
options 7980
| Result | Test | Time |
|---|---|---|
| ✔️ | diff | 1ms |
| ✔️ | diffStringsUnified | 0ms |
options change indicators
| Result | Test | Time |
|---|---|---|
| ✔️ | diff | 0ms |
options change color
| Result | Test | Time |
|---|---|---|
| ✔️ | diffStringsUnified | 0ms |
| ✔️ | no diff | 0ms |
options common
| Result | Test | Time |
|---|---|---|
| ✔️ | diff | 5ms |
| ✔️ | no diff | 1ms |
options includeChangeCounts false
| Result | Test | Time |
|---|---|---|
| ✔️ | diffLinesUnified | 2ms |
| ✔️ | diffStringsUnified | 0ms |
options includeChangeCounts true padding
| Result | Test | Time |
|---|---|---|
| ✔️ | diffLinesUnified a has 2 digits | 0ms |
| ✔️ | diffLinesUnified b has 2 digits | 0ms |
| ✔️ | diffStringsUnified | 0ms |
options omitAnnotationLines true
| Result | Test | Time |
|---|---|---|
| ✔️ | diff | 1ms |
| ✔️ | diffStringsUnified and includeChangeCounts true | 0ms |
| ✔️ | diffStringsUnified empty strings | 0ms |
options trailingSpaceFormatter
| Result | Test | Time |
|---|---|---|
| ✔️ | diffDefault default no color | 1ms |
| ✔️ | diffDefault middle dot | 0ms |
| ✔️ | diffDefault yellowish common | 0ms |
options emptyFirstOrLastLinePlaceholder default empty string
| Result | Test | Time |
|---|---|---|
| ✔️ | diffDefault | 0ms |
| ✔️ | diffStringsUnified | 0ms |
packages/jest-core/src/tests/watchTestNamePatternMode.test.js ✔️
Watch mode flows
| Result | Test | Time |
|---|---|---|
| ✔️ | Pressing "T" enters pattern mode | 8ms |
packages/expect/src/tests/spyMatchers.test.ts ✔️
toBeCalled
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 1ms |
| ✔️ | passes when called | 1ms |
| ✔️ | .not passes when called | 1ms |
| ✔️ | fails with any argument passed | 0ms |
| ✔️ | .not fails with any argument passed | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toHaveBeenCalled
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 1ms |
| ✔️ | passes when called | 1ms |
| ✔️ | .not passes when called | 0ms |
| ✔️ | fails with any argument passed | 1ms |
| ✔️ | .not fails with any argument passed | 0ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toBeCalledTimes
| Result | Test | Time |
|---|---|---|
| ✔️ | .not works only on spies or jest.fn | 0ms |
| ✔️ | only accepts a number argument | 5ms |
| ✔️ | .not only accepts a number argument | 2ms |
| ✔️ | passes if function called equal to expected times | 0ms |
| ✔️ | .not passes if function called more than expected times | 1ms |
| ✔️ | .not passes if function called less than expected times | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toHaveBeenCalledTimes
| Result | Test | Time |
|---|---|---|
| ✔️ | .not works only on spies or jest.fn | 0ms |
| ✔️ | only accepts a number argument | 1ms |
| ✔️ | .not only accepts a number argument | 4ms |
| ✔️ | passes if function called equal to expected times | 0ms |
| ✔️ | .not passes if function called more than expected times | 1ms |
| ✔️ | .not passes if function called less than expected times | 0ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
lastCalledWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 1ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with arguments that don't match | 1ms |
| ✔️ | works with arguments that match | 1ms |
| ✔️ | works with trailing undefined arguments | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 2ms |
| ✔️ | works with Immutable.js objects | 1ms |
| ✔️ | works with many arguments | 0ms |
| ✔️ | works with many arguments that don't match | 1ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
toHaveBeenLastCalledWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 1ms |
| ✔️ | works with arguments that don't match | 0ms |
| ✔️ | works with arguments that match | 1ms |
| ✔️ | works with trailing undefined arguments | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects | 1ms |
| ✔️ | works with many arguments | 0ms |
| ✔️ | works with many arguments that don't match | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
nthCalledWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 1ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 1ms |
| ✔️ | works with arguments that don't match | 0ms |
| ✔️ | works with arguments that match | 1ms |
| ✔️ | works with trailing undefined arguments | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects | 1ms |
| ✔️ | works with three calls | 0ms |
| ✔️ | positive throw matcher error for n that is not positive integer | 0ms |
| ✔️ | positive throw matcher error for n that is not integer | 0ms |
| ✔️ | negative throw matcher error for n that is not integer | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toHaveBeenNthCalledWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 1ms |
| ✔️ | works with arguments that don't match | 0ms |
| ✔️ | works with arguments that match | 1ms |
| ✔️ | works with trailing undefined arguments | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects | 1ms |
| ✔️ | works with three calls | 2ms |
| ✔️ | positive throw matcher error for n that is not positive integer | 0ms |
| ✔️ | positive throw matcher error for n that is not integer | 0ms |
| ✔️ | negative throw matcher error for n that is not integer | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toBeCalledWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 1ms |
| ✔️ | works with arguments that don't match | 0ms |
| ✔️ | works with arguments that match | 1ms |
| ✔️ | works with trailing undefined arguments | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects | 1ms |
| ✔️ | works with many arguments | 0ms |
| ✔️ | works with many arguments that don't match | 0ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
toHaveBeenCalledWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with arguments that don't match | 0ms |
| ✔️ | works with arguments that match | 0ms |
| ✔️ | works with trailing undefined arguments | 1ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects | 0ms |
| ✔️ | works with many arguments | 1ms |
| ✔️ | works with many arguments that don't match | 0ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
toReturn
| Result | Test | Time |
|---|---|---|
| ✔️ | .not works only on jest.fn | 0ms |
| ✔️ | throw matcher error if received is spy | 0ms |
| ✔️ | passes when returned | 0ms |
| ✔️ | passes when undefined is returned | 0ms |
| ✔️ | passes when at least one call does not throw | 0ms |
| ✔️ | .not passes when not returned | 0ms |
| ✔️ | .not passes when all calls throw | 1ms |
| ✔️ | .not passes when a call throws undefined | 0ms |
| ✔️ | fails with any argument passed | 1ms |
| ✔️ | .not fails with any argument passed | 0ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 0ms |
toHaveReturned
| Result | Test | Time |
|---|---|---|
| ✔️ | .not works only on jest.fn | 0ms |
| ✔️ | throw matcher error if received is spy | 1ms |
| ✔️ | passes when returned | 0ms |
| ✔️ | passes when undefined is returned | 3ms |
| ✔️ | passes when at least one call does not throw | 0ms |
| ✔️ | .not passes when not returned | 1ms |
| ✔️ | .not passes when all calls throw | 0ms |
| ✔️ | .not passes when a call throws undefined | 1ms |
| ✔️ | fails with any argument passed | 0ms |
| ✔️ | .not fails with any argument passed | 0ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 0ms |
toReturnTimes
| Result | Test | Time |
|---|---|---|
| ✔️ | throw matcher error if received is spy | 0ms |
| ✔️ | only accepts a number argument | 2ms |
| ✔️ | .not only accepts a number argument | 1ms |
| ✔️ | passes if function returned equal to expected times | 1ms |
| ✔️ | calls that return undefined are counted as returns | 0ms |
| ✔️ | .not passes if function returned more than expected times | 0ms |
| ✔️ | .not passes if function called less than expected times | 1ms |
| ✔️ | calls that throw are not counted | 0ms |
| ✔️ | calls that throw undefined are not counted | 2ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 0ms |
toHaveReturnedTimes
| Result | Test | Time |
|---|---|---|
| ✔️ | throw matcher error if received is spy | 0ms |
| ✔️ | only accepts a number argument | 2ms |
| ✔️ | .not only accepts a number argument | 1ms |
| ✔️ | passes if function returned equal to expected times | 0ms |
| ✔️ | calls that return undefined are counted as returns | 0ms |
| ✔️ | .not passes if function returned more than expected times | 1ms |
| ✔️ | .not passes if function called less than expected times | 0ms |
| ✔️ | calls that throw are not counted | 0ms |
| ✔️ | calls that throw undefined are not counted | 0ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
| ✔️ | incomplete recursive calls are handled properly | 1ms |
lastReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 1ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with argument that does not match | 1ms |
| ✔️ | works with argument that does match | 1ms |
| ✔️ | works with undefined | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects directly created | 1ms |
| ✔️ | works with Immutable.js objects indirectly created | 1ms |
| ✔️ | a call that throws is not considered to have returned | 0ms |
| ✔️ | a call that throws undefined is not considered to have returned | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
lastReturnedWith lastReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works with three calls | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 5ms |
toHaveLastReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with argument that does not match | 0ms |
| ✔️ | works with argument that does match | 1ms |
| ✔️ | works with undefined | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects directly created | 1ms |
| ✔️ | works with Immutable.js objects indirectly created | 1ms |
| ✔️ | a call that throws is not considered to have returned | 0ms |
| ✔️ | a call that throws undefined is not considered to have returned | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toHaveLastReturnedWith lastReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works with three calls | 0ms |
| ✔️ | incomplete recursive calls are handled properly | 1ms |
nthReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 1ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with argument that does not match | 1ms |
| ✔️ | works with argument that does match | 1ms |
| ✔️ | works with undefined | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects directly created | 1ms |
| ✔️ | works with Immutable.js objects indirectly created | 0ms |
| ✔️ | a call that throws is not considered to have returned | 0ms |
| ✔️ | a call that throws undefined is not considered to have returned | 1ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
nthReturnedWith nthReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works with three calls | 0ms |
| ✔️ | should replace 1st, 2nd, 3rd with first, second, third | 1ms |
| ✔️ | positive throw matcher error for n that is not positive integer | 1ms |
| ✔️ | should reject nth value greater than number of calls | 0ms |
| ✔️ | positive throw matcher error for n that is not integer | 1ms |
| ✔️ | negative throw matcher error for n that is not number | 0ms |
| ✔️ | incomplete recursive calls are handled properly | 2ms |
toHaveNthReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 1ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with argument that does not match | 0ms |
| ✔️ | works with argument that does match | 1ms |
| ✔️ | works with undefined | 0ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 1ms |
| ✔️ | works with Immutable.js objects directly created | 1ms |
| ✔️ | works with Immutable.js objects indirectly created | 0ms |
| ✔️ | a call that throws is not considered to have returned | 1ms |
| ✔️ | a call that throws undefined is not considered to have returned | 2ms |
| ✔️ | includes the custom mock name in the error message | 0ms |
toHaveNthReturnedWith nthReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works with three calls | 1ms |
| ✔️ | should replace 1st, 2nd, 3rd with first, second, third | 0ms |
| ✔️ | positive throw matcher error for n that is not positive integer | 1ms |
| ✔️ | should reject nth value greater than number of calls | 0ms |
| ✔️ | positive throw matcher error for n that is not integer | 0ms |
| ✔️ | negative throw matcher error for n that is not number | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 1ms |
toReturnWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 1ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 0ms |
| ✔️ | works with argument that does not match | 1ms |
| ✔️ | works with argument that does match | 0ms |
| ✔️ | works with undefined | 1ms |
| ✔️ | works with Map | 0ms |
| ✔️ | works with Set | 2ms |
| ✔️ | works with Immutable.js objects directly created | 1ms |
| ✔️ | works with Immutable.js objects indirectly created | 0ms |
| ✔️ | a call that throws is not considered to have returned | 0ms |
| ✔️ | a call that throws undefined is not considered to have returned | 1ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
toReturnWith returnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works with more calls than the limit | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 0ms |
toHaveReturnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works only on spies or jest.fn | 0ms |
| ✔️ | works when not called | 0ms |
| ✔️ | works with no arguments | 1ms |
| ✔️ | works with argument that does not match | 0ms |
| ✔️ | works with argument that does match | 0ms |
| ✔️ | works with undefined | 1ms |
| ✔️ | works with Map | 1ms |
| ✔️ | works with Set | 0ms |
| ✔️ | works with Immutable.js objects directly created | 1ms |
| ✔️ | works with Immutable.js objects indirectly created | 0ms |
| ✔️ | a call that throws is not considered to have returned | 1ms |
| ✔️ | a call that throws undefined is not considered to have returned | 0ms |
| ✔️ | includes the custom mock name in the error message | 1ms |
toHaveReturnedWith returnedWith
| Result | Test | Time |
|---|---|---|
| ✔️ | works with more calls than the limit | 1ms |
| ✔️ | incomplete recursive calls are handled properly | 0ms |
e2e/tests/jestChangedFiles.test.ts ❌
| Result | Test | Time |
|---|---|---|
| ✔️ | gets hg SCM roots and dedupes them | 559ms |
| ✔️ | gets git SCM roots and dedupes them | 416ms |
| ✔️ | gets mixed git and hg SCM roots and dedupes them | 467ms |
| ✔️ | gets changed files for git | 2298ms |
| ✔️ | monitors only root paths for git | 151ms |
| ✔️ | does not find changes in files with no diff, for git | 628ms |
| ✔️ | handles a bad revision for "changedSince", for git | 878ms |
| ❌ | gets changed files for hg | 2219ms |
| ✔️ | monitors only root paths for hg | 281ms |
| ✔️ | handles a bad revision for "changedSince", for hg | 949ms |
packages/jest-matcher-utils/src/tests/index.test.ts ✔️
stringify()
| Result | Test | Time |
|---|---|---|
| ✔️ | [] | 0ms |
| ✔️ | {} | 1ms |
| ✔️ | 1 | 0ms |
| ✔️ | 0 | 0ms |
| ✔️ | 1.5 | 1ms |
| ✔️ | null | 0ms |
| ✔️ | undefined | 0ms |
| ✔️ | "abc" | 0ms |
| ✔️ | Symbol(abc) | 0ms |
| ✔️ | NaN | 0ms |
| ✔️ | Infinity | 0ms |
| ✔️ | -Infinity | 1ms |
| ✔️ | /ab.c/gi | 0ms |
| ✔️ | 1n | 0ms |
| ✔️ | 0n | 0ms |
| ✔️ | circular references | 0ms |
| ✔️ | toJSON error | 1ms |
| ✔️ | toJSON errors when comparing two objects | 3ms |
| ✔️ | reduces maxDepth if stringifying very large objects | 96ms |
ensureNumbers()
| Result | Test | Time |
|---|---|---|
| ✔️ | dont throw error when variables are numbers | 0ms |
| ✔️ | throws error when expected is not a number (backward compatibility) | 1ms |
| ✔️ | throws error when received is not a number (backward compatibility) | 0ms |
ensureNumbers() with options
| Result | Test | Time |
|---|---|---|
| ✔️ | promise empty isNot false received | 1ms |
| ✔️ | promise empty isNot true expected | 1ms |
| ✔️ | promise rejects isNot false expected | 0ms |
| ✔️ | promise rejects isNot true received | 0ms |
| ✔️ | promise resolves isNot false received | 1ms |
| ✔️ | promise resolves isNot true expected | 0ms |
ensureNoExpected()
| Result | Test | Time |
|---|---|---|
| ✔️ | dont throw error when undefined | 0ms |
| ✔️ | throws error when expected is not undefined with matcherName | 1ms |
| ✔️ | throws error when expected is not undefined with matcherName and options | 0ms |
diff
| Result | Test | Time |
|---|---|---|
| ✔️ | forwards to jest-diff | 1ms |
| ✔️ | two booleans | 0ms |
| ✔️ | two numbers | 0ms |
| ✔️ | two bigints | 0ms |
pluralize()
| Result | Test | Time |
|---|---|---|
| ✔️ | one | 1ms |
| ✔️ | two | 0ms |
| ✔️ | 20 | 1ms |
getLabelPrinter
| Result | Test | Time |
|---|---|---|
| ✔️ | 0 args | 0ms |
| ✔️ | 1 empty string | 0ms |
| ✔️ | 1 non-empty string | 0ms |
| ✔️ | 2 equal lengths | 1ms |
| ✔️ | 2 unequal lengths | 0ms |
| ✔️ | returns incorrect padding if inconsistent arg is shorter | 0ms |
| ✔️ | throws if inconsistent arg is longer | 26ms |
matcherHint
| Result | Test | Time |
|---|---|---|
| ✔️ | expectedColor | 0ms |
| ✔️ | receivedColor | 1ms |
| ✔️ | secondArgumentColor | 0ms |
packages/jest-core/src/tests/watchFilenamePatternMode.test.js ✔️
Watch mode flows
| Result | Test | Time |
|---|---|---|
| ✔️ | Pressing "P" enters pattern mode | 7ms |
| ✔️ | Pressing "c" clears the filters | 1ms |
packages/jest-runtime/src/tests/runtime_create_mock_from_module.test.js ✔️
Runtime createMockFromModule
| Result | Test | Time |
|---|---|---|
| ✔️ | does not cause side effects in the rest of the module system when generating a mock | 408ms |
| ✔️ | resolves mapped modules correctly | 94ms |
Runtime
| Result | Test | Time |
|---|---|---|
| ✔️ | creates mock objects in the right environment | 37ms |
packages/jest-runtime/src/tests/runtime_environment.test.js ✔️
Runtime requireModule
| Result | Test | Time |
|---|---|---|
| ✔️ | emulates a node stack trace during module load | 398ms |
| ✔️ | emulates a node stack trace during function execution | 70ms |
packages/jest-haste-map/src/tests/includes_dotfiles.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | watchman crawler and node crawler both include dotfiles | 77ms |
packages/jest-haste-map/src/crawlers/tests/watchman.test.js ✔️
watchman watch
| Result | Test | Time |
|---|---|---|
| ✔️ | returns a list of all files when there are no clocks | 7ms |
| ✔️ | updates file map and removedFiles when the clock is given | 1ms |
| ✔️ | resets the file map and tracks removedFiles when watchman is fresh | 2ms |
| ✔️ | properly resets the file map when only one watcher is reset | 6ms |
| ✔️ | does not add directory filters to query when watching a ROOT | 2ms |
| ✔️ | SHA-1 requested and available | 1ms |
| ✔️ | SHA-1 requested and NOT available | 1ms |
| ✔️ | source control query | 1ms |
packages/jest-fake-timers/src/tests/legacyFakeTimers.test.ts ✔️
FakeTimers construction
| Result | Test | Time |
|---|---|---|
| ✔️ | installs setTimeout mock | 1ms |
| ✔️ | accepts to promisify setTimeout mock | 2ms |
| ✔️ | installs clearTimeout mock | 1ms |
| ✔️ | installs setInterval mock | 0ms |
| ✔️ | installs clearInterval mock | 1ms |
| ✔️ | mocks process.nextTick if it exists on global | 1ms |
| ✔️ | mocks setImmediate if it exists on global | 1ms |
| ✔️ | mocks clearImmediate if setImmediate is on global | 1ms |
FakeTimers runAllTicks
| Result | Test | Time |
|---|---|---|
| ✔️ | runs all ticks, in order | 1ms |
| ✔️ | does nothing when no ticks have been scheduled | 1ms |
| ✔️ | only runs a scheduled callback once | 1ms |
| ✔️ | cancels a callback even from native nextTick | 1ms |
| ✔️ | cancels a callback even from native setImmediate | 1ms |
| ✔️ | doesnt run a tick callback if native nextTick already did | 1ms |
| ✔️ | doesnt run immediate if native setImmediate already did | 1ms |
| ✔️ | native doesnt run immediate if fake already did | 2ms |
| ✔️ | throws before allowing infinite recursion | 43ms |
FakeTimers runAllTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | runs all timers in order | 1ms |
| ✔️ | warns when trying to advance timers while real timers are used | 3ms |
| ✔️ | does nothing when no timers have been scheduled | 1ms |
| ✔️ | only runs a setTimeout callback once (ever) | 1ms |
| ✔️ | runs callbacks with arguments after the interval | 1ms |
| ✔️ | doesnt pass the callback to native setTimeout | 0ms |
| ✔️ | throws before allowing infinite recursion | 1ms |
| ✔️ | also clears ticks | 1ms |
FakeTimers advanceTimersByTime
| Result | Test | Time |
|---|---|---|
| ✔️ | runs timers in order | 1ms |
| ✔️ | does nothing when no timers have been scheduled | 1ms |
| ✔️ | throws before allowing infinite recursion | 1ms |
FakeTimers advanceTimersToNextTimer
| Result | Test | Time |
|---|---|---|
| ✔️ | runs timers in order | 1ms |
| ✔️ | run correct amount of steps | 1ms |
| ✔️ | setTimeout inside setTimeout | 0ms |
| ✔️ | does nothing when no timers have been scheduled | 1ms |
FakeTimers reset
| Result | Test | Time |
|---|---|---|
| ✔️ | resets all pending setTimeouts | 1ms |
| ✔️ | resets all pending setIntervals | 1ms |
| ✔️ | resets all pending ticks callbacks & immediates | 1ms |
| ✔️ | resets current advanceTimersByTime time cursor | 1ms |
FakeTimers runOnlyPendingTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | runs all timers in order | 1ms |
| ✔️ | does not run timers that were cleared in another timer | 1ms |
FakeTimers runWithRealTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | executes callback with native timers | 2ms |
| ✔️ | resets mock timers after executing callback | 1ms |
| ✔️ | resets mock timer functions even if callback throws | 2ms |
FakeTimers useRealTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | resets native timer APIs | 1ms |
| ✔️ | resets native process.nextTick when present | 1ms |
| ✔️ | resets native setImmediate when present | 1ms |
FakeTimers useFakeTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | resets mock timer APIs | 1ms |
| ✔️ | resets mock process.nextTick when present | 1ms |
| ✔️ | resets mock setImmediate when present | 1ms |
FakeTimers getTimerCount
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the correct count | 1ms |
| ✔️ | includes immediates and ticks | 10ms |
| ✔️ | not includes cancelled immediates | 1ms |
packages/jest-runtime/src/tests/runtime_jest_fn.js ✔️
Runtime jest.fn
| Result | Test | Time |
|---|---|---|
| ✔️ | creates mock functions | 330ms |
| ✔️ | creates mock functions with mock implementations | 31ms |
Runtime jest.isMockFunction
| Result | Test | Time |
|---|---|---|
| ✔️ | recognizes a mocked function | 35ms |
Runtime jest.clearAllMocks
| Result | Test | Time |
|---|---|---|
| ✔️ | clears all mocks | 29ms |
packages/expect/src/tests/matchers-toStrictEqual.property.test.ts ✔️
toStrictEqual
| Result | Test | Time |
|---|---|---|
| ✔️ | should be reflexive | 44ms |
| ✔️ | should be symmetric | 92ms |
toStrictEqual on node >=9
| Result | Test | Time |
|---|---|---|
| ✔️ | should be equivalent to Node deepStrictEqual | 113ms |
packages/diff-sequences/src/tests/index.property.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should be reflexive | 45ms |
| ✔️ | should find the same number of common items when switching the inputs | 29ms |
| ✔️ | should have at most the length of its inputs | 20ms |
| ✔️ | should have at most the same number of each character as its inputs | 17ms |
| ✔️ | should be a subsequence of its inputs | 22ms |
| ✔️ | should be no-op when passing common items | 30ms |
| ✔️ | should find the exact common items when one array is subarray of the other | 22ms |
packages/jest-fake-timers/src/tests/modernFakeTimers.test.ts ✔️
FakeTimers construction
| Result | Test | Time |
|---|---|---|
| ✔️ | installs setTimeout mock | 1ms |
| ✔️ | installs clearTimeout mock | 0ms |
| ✔️ | installs setInterval mock | 1ms |
| ✔️ | installs clearInterval mock | 1ms |
| ✔️ | mocks process.nextTick if it exists on global | 0ms |
| ✔️ | mocks setImmediate if it exists on global | 0ms |
| ✔️ | mocks clearImmediate if setImmediate is on global | 0ms |
FakeTimers runAllTicks
| Result | Test | Time |
|---|---|---|
| ✔️ | runs all ticks, in order | 1ms |
| ✔️ | does nothing when no ticks have been scheduled | 0ms |
| ✔️ | only runs a scheduled callback once | 1ms |
| ✔️ | throws before allowing infinite recursion | 25ms |
FakeTimers runAllTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | runs all timers in order | 1ms |
| ✔️ | warns when trying to advance timers while real timers are used | 4ms |
| ✔️ | does nothing when no timers have been scheduled | 1ms |
| ✔️ | only runs a setTimeout callback once (ever) | 0ms |
| ✔️ | runs callbacks with arguments after the interval | 1ms |
| ✔️ | doesn't pass the callback to native setTimeout | 0ms |
| ✔️ | throws before allowing infinite recursion | 7ms |
| ✔️ | also clears ticks | 1ms |
FakeTimers advanceTimersByTime
| Result | Test | Time |
|---|---|---|
| ✔️ | runs timers in order | 1ms |
| ✔️ | does nothing when no timers have been scheduled | 0ms |
FakeTimers advanceTimersToNextTimer
| Result | Test | Time |
|---|---|---|
| ✔️ | runs timers in order | 4ms |
| ✔️ | run correct amount of steps | 1ms |
| ✔️ | setTimeout inside setTimeout | 0ms |
| ✔️ | does nothing when no timers have been scheduled | 1ms |
FakeTimers reset
| Result | Test | Time |
|---|---|---|
| ✔️ | resets all pending setTimeouts | 0ms |
| ✔️ | resets all pending setIntervals | 0ms |
| ✔️ | resets all pending ticks callbacks | 1ms |
| ✔️ | resets current advanceTimersByTime time cursor | 0ms |
FakeTimers runOnlyPendingTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | runs all timers in order | 1ms |
| ✔️ | does not run timers that were cleared in another timer | 0ms |
FakeTimers useRealTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | resets native timer APIs | 2ms |
| ✔️ | resets native process.nextTick when present | 0ms |
| ✔️ | resets native setImmediate when present | 0ms |
FakeTimers useFakeTimers
| Result | Test | Time |
|---|---|---|
| ✔️ | resets mock timer APIs | 1ms |
| ✔️ | resets mock process.nextTick when present | 0ms |
| ✔️ | resets mock setImmediate when present | 0ms |
FakeTimers getTimerCount
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the correct count | 1ms |
| ✔️ | includes immediates and ticks | 0ms |
| ✔️ | not includes cancelled immediates | 1ms |
packages/expect/src/tests/matchers-toContain.property.test.ts ✔️
toContain
| Result | Test | Time |
|---|---|---|
| ✔️ | should always find the value when inside the array | 122ms |
| ✔️ | should not find the value if it has been cloned into the array | 56ms |
packages/jest-runtime/src/tests/runtime_wrap.js ✔️
Runtime wrapCodeInModuleWrapper
| Result | Test | Time |
|---|---|---|
| ✔️ | generates the correct args for the module wrapper | 194ms |
| ✔️ | injects "extra globals" | 43ms |
packages/expect/src/tests/matchers-toContainEqual.property.test.ts ✔️
toContainEqual
| Result | Test | Time |
|---|---|---|
| ✔️ | should always find the value when inside the array | 91ms |
| ✔️ | should always find the value when cloned inside the array | 52ms |
packages/diff-sequences/src/tests/index.test.ts ✔️
invalid arg length
| Result | Test | Time |
|---|---|---|
| ✔️ | is not a number | 40ms |
| ✔️ | Infinity is not a safe integer | 1ms |
| ✔️ | Not a Number is not a safe integer | 0ms |
| ✔️ | MAX_SAFE_INTEGER + 1 is not a safe integer | 0ms |
| ✔️ | MIN_SAFE_INTEGER - 1 is not a safe integer | 1ms |
| ✔️ | is a negative integer | 0ms |
invalid arg callback
| Result | Test | Time |
|---|---|---|
| ✔️ | null is not a function | 1ms |
| ✔️ | undefined is not a function | 0ms |
input callback encapsulates comparison zero and negative zero
| Result | Test | Time |
|---|---|---|
| ✔️ | are not common according to Object.is method | 0ms |
| ✔️ | are common according to === operator | 0ms |
input callback encapsulates comparison Not a Number
| Result | Test | Time |
|---|---|---|
| ✔️ | is common according to Object.is method | 0ms |
| ✔️ | is not common according to === operator | 0ms |
input callback encapsulates sequences
| Result | Test | Time |
|---|---|---|
| ✔️ | arrays of strings | 1ms |
| ✔️ | string and array of strings | 1ms |
| ✔️ | strings | 1ms |
no common items negative zero is equivalent to zero for length
| Result | Test | Time |
|---|---|---|
| ✔️ | of a | 0ms |
| ✔️ | of b | 0ms |
| ✔️ | of a and b | 1ms |
no common items
| Result | Test | Time |
|---|---|---|
| ✔️ | a empty and b empty | 3ms |
| ✔️ | a empty and b non-empty | 1ms |
| ✔️ | a non-empty and b empty | 0ms |
no common items a non-empty and b non-empty
| Result | Test | Time |
|---|---|---|
| ✔️ | baDeltaLength 0 even | 1ms |
| ✔️ | baDeltaLength 1 odd | 0ms |
| ✔️ | baDeltaLength 2 even | 0ms |
| ✔️ | baDeltaLength 7 odd | 1ms |
only common items
| Result | Test | Time |
|---|---|---|
| ✔️ | length 1 | 0ms |
| ✔️ | length 2 | 1ms |
all common items outside
| Result | Test | Time |
|---|---|---|
| ✔️ | preceding changes | 0ms |
| ✔️ | following change | 0ms |
| ✔️ | preceding and following changes in one sequence | 1ms |
some common items inside and outside
| Result | Test | Time |
|---|---|---|
| ✔️ | preceding changes adjacent to common in both sequences | 0ms |
| ✔️ | following changes adjacent to common in both sequences | 1ms |
all common items inside non-recursive
| Result | Test | Time |
|---|---|---|
| ✔️ | move from start to end relative to change | 0ms |
| ✔️ | move from start to end relative to common | 0ms |
| ✔️ | move from start to end relative to change and common | 0ms |
| ✔️ | reverse relative to change | 0ms |
| ✔️ | preceding middle | 0ms |
| ✔️ | following middle | 1ms |
all common items inside recursive
| Result | Test | Time |
|---|---|---|
| ✔️ | prev reverse at depth 1 and preceding at depth 2 | 0ms |
| ✔️ | last forward at depth 1 and following at depth 2 | 1ms |
| ✔️ | preceding at depth 2 and both at depth 3 of following | 7ms |
| ✔️ | interleaved single change | 0ms |
| ✔️ | interleaved double changes | 1ms |
| ✔️ | optimization decreases iMaxF | 0ms |
| ✔️ | optimization decreases iMaxR | 0ms |
common substrings
| Result | Test | Time |
|---|---|---|
| ✔️ | progress | 1ms |
| ✔️ | regression | 12ms |
| ✔️ | wrapping | 1ms |
packages/jest-get-type/src/tests/getType.test.ts ✔️
.getType()
| Result | Test | Time |
|---|---|---|
| ✔️ | null | 1ms |
| ✔️ | undefined | 0ms |
| ✔️ | object | 0ms |
| ✔️ | array | 0ms |
| ✔️ | number | 1ms |
| ✔️ | string | 0ms |
| ✔️ | function | 0ms |
| ✔️ | boolean | 0ms |
| ✔️ | symbol | 1ms |
| ✔️ | regexp | 0ms |
| ✔️ | map | 0ms |
| ✔️ | set | 0ms |
| ✔️ | date | 0ms |
| ✔️ | bigint | 1ms |
packages/jest-cli/src/init/tests/init.test.js ✔️
init project with package.json and no jest config all questions answered with answer: "No"
| Result | Test | Time |
|---|---|---|
| ✔️ | should return the default configuration (an empty config) | 1ms |
| ✔️ | should generate empty config with mjs extension | 1ms |
init project with package.json and no jest config some questions answered with answer: "Yes"
| Result | Test | Time |
|---|---|---|
| ✔️ | should create configuration for {clearMocks: true} | 1ms |
| ✔️ | should create configuration for {coverage: true} | 1ms |
| ✔️ | should create configuration for {coverageProvider: "babel"} | 0ms |
| ✔️ | should create configuration for {coverageProvider: "v8"} | 0ms |
| ✔️ | should create configuration for {environment: "jsdom"} | 0ms |
| ✔️ | should create configuration for {environment: "node"} | 1ms |
| ✔️ | should create package.json with configured test command when {scripts: true} | 1ms |
init no package json
| Result | Test | Time |
|---|---|---|
| ✔️ | should throw an error if there is no package.json file | 0ms |
init has-jest-config-file-js ask the user whether to override config or not
| Result | Test | Time |
|---|---|---|
| ✔️ | user answered with "Yes" | 1ms |
| ✔️ | user answered with "No" | 0ms |
init has-jest-config-file-ts ask the user whether to override config or not
| Result | Test | Time |
|---|---|---|
| ✔️ | user answered with "Yes" | 1ms |
| ✔️ | user answered with "No" | 0ms |
init has-jest-config-file-mjs ask the user whether to override config or not
| Result | Test | Time |
|---|---|---|
| ✔️ | user answered with "Yes" | 0ms |
| ✔️ | user answered with "No" | 1ms |
init has-jest-config-file-cjs ask the user whether to override config or not
| Result | Test | Time |
|---|---|---|
| ✔️ | user answered with "Yes" | 1ms |
| ✔️ | user answered with "No" | 1ms |
init has-jest-config-file-json ask the user whether to override config or not
| Result | Test | Time |
|---|---|---|
| ✔️ | user answered with "Yes" | 0ms |
| ✔️ | user answered with "No" | 0ms |
init project using jest.config.ts ask the user whether he wants to use Typescript or not
| Result | Test | Time |
|---|---|---|
| ✔️ | user answered with "Yes" | 1ms |
| ✔️ | user answered with "No" | 1ms |
init has jest config in package.json
| Result | Test | Time |
|---|---|---|
| ✔️ | should ask the user whether to override config or not | 1ms |
init already has "jest" in packageJson.scripts.test
| Result | Test | Time |
|---|---|---|
| ✔️ | should not ask "test script question" | 0ms |
packages/jest-runtime/src/tests/runtime_require_module_no_ext.test.js ✔️
Runtime requireModule with no extension
| Result | Test | Time |
|---|---|---|
| ✔️ | throws error pointing out file with extension | 204ms |
packages/jest-util/src/tests/deepCyclicCopy.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the same value for primitive or function values | 1ms |
| ✔️ | does not execute getters/setters, but copies them | 0ms |
| ✔️ | copies symbols | 10ms |
| ✔️ | copies arrays as array objects | 1ms |
| ✔️ | handles cyclic dependencies | 0ms |
| ✔️ | uses the blacklist to avoid copying properties on the first level | 1ms |
| ✔️ | does not keep the prototype by default when top level is object | 0ms |
| ✔️ | does not keep the prototype by default when top level is array | 1ms |
| ✔️ | does not keep the prototype of arrays when keepPrototype = false | 0ms |
| ✔️ | keeps the prototype of arrays when keepPrototype = true | 2ms |
| ✔️ | does not keep the prototype for objects when keepPrototype = false | 0ms |
| ✔️ | keeps the prototype for objects when keepPrototype = true | 1ms |
e2e/tests/version.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with jest.config.js | 94ms |
packages/jest-util/src/tests/createProcessObject.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | creates a process object that looks like the original one | 32ms |
| ✔️ | fakes require("process") so it is equal to "global.process" | 0ms |
| ✔️ | checks that process.env works as expected on Linux platforms | 5ms |
| ✔️ | checks that process.env works as expected in Windows platforms | 2ms |
packages/jest-runtime/src/tests/instrumentation.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | instruments files | 239ms |
packages/jest-core/src/tests/runJest.test.js ✔️
runJest
| Result | Test | Time |
|---|---|---|
| ✔️ | when watch is set then exit process | 18ms |
| ✔️ | when watch is set then an error message is printed | 1ms |
packages/jest-matcher-utils/src/tests/Replaceable.test.ts ✔️
Replaceable constructor
| Result | Test | Time |
|---|---|---|
| ✔️ | init with object | 0ms |
| ✔️ | init with array | 0ms |
| ✔️ | init with Map | 0ms |
| ✔️ | init with other type should throw error | 16ms |
Replaceable get
| Result | Test | Time |
|---|---|---|
| ✔️ | get object item | 0ms |
| ✔️ | get array item | 0ms |
| ✔️ | get Map item | 1ms |
Replaceable set
| Result | Test | Time |
|---|---|---|
| ✔️ | set object item | 0ms |
| ✔️ | set array item | 0ms |
| ✔️ | set Map item | 0ms |
Replaceable forEach
| Result | Test | Time |
|---|---|---|
| ✔️ | object forEach | 1ms |
| ✔️ | array forEach | 0ms |
| ✔️ | map forEach | 0ms |
| ✔️ | forEach should ignore nonenumerable property | 1ms |
Replaceable isReplaceable
| Result | Test | Time |
|---|---|---|
| ✔️ | should return true if two object types equal and support | 1ms |
| ✔️ | should return false if two object types not equal | 0ms |
| ✔️ | should return false if object types not support | 0ms |
packages/jest-util/src/tests/formatTime.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to milliseconds | 1ms |
| ✔️ | formats seconds properly | 0ms |
| ✔️ | formats milliseconds properly | 0ms |
| ✔️ | formats microseconds properly | 30ms |
| ✔️ | formats nanoseconds properly | 0ms |
| ✔️ | interprets lower than lowest powers as nanoseconds | 0ms |
| ✔️ | interprets higher than highest powers as seconds | 2ms |
| ✔️ | interprets non-multiple-of-3 powers as next higher prefix | 0ms |
| ✔️ | formats the quantity properly when pad length is lower | 0ms |
| ✔️ | formats the quantity properly when pad length is equal | 0ms |
| ✔️ | left pads the quantity properly when pad length is higher | 0ms |
packages/jest-worker/src/tests/thread-integration.test.js ✔️
Jest Worker Process Integration
| Result | Test | Time |
|---|---|---|
| ✔️ | calls a single method from the worker | 25ms |
| ✔️ | distributes sequential calls across child processes | 6ms |
| ✔️ | schedules the task on the first available child processes if the scheduling policy is in-order | 3ms |
| ✔️ | schedules the task on the first available child processes | 4ms |
| ✔️ | distributes concurrent calls across child processes | 6ms |
| ✔️ | sticks parallel calls to children | 15ms |
packages/jest-haste-map/src/tests/worker.test.js ✔️
worker
| Result | Test | Time |
|---|---|---|
| ✔️ | parses JavaScript files and extracts module information | 1ms |
| ✔️ | accepts a custom dependency extractor | 2ms |
| ✔️ | delegates to hasteImplModulePath for getting the id | 1ms |
| ✔️ | parses package.json files as haste packages | 1ms |
| ✔️ | returns an error when a file cannot be accessed | 0ms |
| ✔️ | simply computes SHA-1s when requested (works well with binary data) | 12ms |
| ✔️ | avoids computing dependencies if not requested and Haste does not need it | 0ms |
packages/jest-matcher-utils/src/tests/printDiffOrStringify.test.ts ✔️
printDiffOrStringify
| Result | Test | Time |
|---|---|---|
| ✔️ | expected is empty and received is single line | 1ms |
| ✔️ | expected is multi line and received is empty | 0ms |
| ✔️ | expected and received are single line with multiple changes | 2ms |
| ✔️ | expected and received are multi line with trailing spaces | 1ms |
| ✔️ | has no common after clean up chaff multiline | 2ms |
| ✔️ | has no common after clean up chaff one-line | 0ms |
| ✔️ | object contain readonly symbol key object | 1ms |
printDiffOrStringify MAX_DIFF_STRING_LENGTH
| Result | Test | Time |
|---|---|---|
| ✔️ | both are less | 1ms |
| ✔️ | expected is more | 4ms |
| ✔️ | received is more | 8ms |
printDiffOrStringify asymmetricMatcher
| Result | Test | Time |
|---|---|---|
| ✔️ | minimal test | 1ms |
| ✔️ | jest asymmetricMatcher | 5ms |
| ✔️ | custom asymmetricMatcher | 0ms |
| ✔️ | nested object | 0ms |
| ✔️ | array | 1ms |
| ✔️ | object in array | 1ms |
| ✔️ | map | 1ms |
| ✔️ | circular object | 1ms |
| ✔️ | transitive circular | 1ms |
| ✔️ | circular array | 1ms |
| ✔️ | circular map | 5ms |
packages/expect/src/tests/utils.test.ts ✔️
getPath()
| Result | Test | Time |
|---|---|---|
| ✔️ | property exists | 0ms |
| ✔️ | property doesnt exist | 1ms |
| ✔️ | property exist but undefined | 0ms |
| ✔️ | property is a getter on class instance | 1ms |
| ✔️ | property is inherited | 1ms |
| ✔️ | path breaks | 0ms |
| ✔️ | empty object at the end | 1ms |
getObjectSubset
| Result | Test | Time |
|---|---|---|
| ✔️ | expect(getObjectSubset({"a": "b", "c": "d"}, {"a": "d"})).toEqual({"a": "b"}) | 1ms |
| ✔️ | expect(getObjectSubset({"a": [1, 2], "b": "b"}, {"a": [3, 4]})).toEqual({"a": [1, 2]}) | 0ms |
| ✔️ | expect(getObjectSubset([{"a": "b", "c": "d"}], [{"a": "z"}])).toEqual([{"a": "b"}]) | 1ms |
| ✔️ | expect(getObjectSubset([1, 2], [1, 2, 3])).toEqual([1, 2]) | 0ms |
| ✔️ | expect(getObjectSubset({"a": [1]}, {"a": [1, 2]})).toEqual({"a": [1]}) | 0ms |
| ✔️ | expect(getObjectSubset(2015-11-30T00:00:00.000Z, 2016-12-30T00:00:00.000Z)).toEqual(2015-11-30T00:00:00.000Z) | 0ms |
getObjectSubset returns the object instance if the subset has no extra properties
| Result | Test | Time |
|---|---|---|
| ✔️ | Date | 0ms |
getObjectSubset returns the subset instance if its property values are equal
| Result | Test | Time |
|---|---|---|
| ✔️ | Object | 0ms |
getObjectSubset returns the subset instance if its property values are equal Uint8Array
| Result | Test | Time |
|---|---|---|
| ✔️ | expected | 0ms |
| ✔️ | received | 1ms |
getObjectSubset calculating subsets of objects with circular references
| Result | Test | Time |
|---|---|---|
| ✔️ | simple circular references | 0ms |
| ✔️ | transitive circular references | 7ms |
emptyObject()
| Result | Test | Time |
|---|---|---|
| ✔️ | matches an empty object | 0ms |
| ✔️ | does not match an object with keys | 0ms |
| ✔️ | does not match a non-object | 0ms |
subsetEquality()
| Result | Test | Time |
|---|---|---|
| ✔️ | matching object returns true | 0ms |
| ✔️ | object without keys is undefined | 0ms |
| ✔️ | objects to not match | 1ms |
| ✔️ | null does not return errors | 0ms |
| ✔️ | undefined does not return errors | 0ms |
subsetEquality() matching subsets with circular references
| Result | Test | Time |
|---|---|---|
| ✔️ | simple circular references | 0ms |
| ✔️ | referenced object on same level should not regarded as circular reference | 0ms |
| ✔️ | transitive circular references | 9ms |
iterableEquality
| Result | Test | Time |
|---|---|---|
| ✔️ | returns true when given circular iterators | 0ms |
| ✔️ | returns true when given circular Set | 0ms |
| ✔️ | returns true when given nested Sets | 1ms |
| ✔️ | returns false when given inequal set within a set | 0ms |
| ✔️ | returns false when given inequal map within a set | 5ms |
| ✔️ | returns false when given inequal set within a map | 0ms |
| ✔️ | returns true when given circular Set shape | 0ms |
| ✔️ | returns true when given circular key in Map | 1ms |
| ✔️ | returns true when given nested Maps | 0ms |
| ✔️ | returns true when given circular key and value in Map | 0ms |
| ✔️ | returns true when given circular value in Map | 0ms |
packages/jest-matcher-utils/src/tests/deepCyclicCopyReplaceable.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the same value for primitive or function values | 1ms |
| ✔️ | convert accessor descriptor into value descriptor | 1ms |
| ✔️ | shuold not skips non-enumerables | 0ms |
| ✔️ | copies symbols | 1ms |
| ✔️ | copies arrays as array objects | 0ms |
| ✔️ | handles cyclic dependencies | 1ms |
| ✔️ | Copy Map | 0ms |
| ✔️ | Copy cyclic Map | 0ms |
| ✔️ | return same value for built-in object type except array, map and object | 0ms |
| ✔️ | should copy object symbol key property | 0ms |
| ✔️ | should set writable, configurable to true | 1ms |
packages/expect/src/tests/isError.test.ts ✔️
isError
| Result | Test | Time |
|---|---|---|
| ✔️ | should not assume objects are errors | 1ms |
| ✔️ | should detect simple error instances | 0ms |
| ✔️ | should detect errors from another context | 12ms |
| ✔️ | should detect DOMException errors from another context | 7ms |
packages/jest-get-type/src/tests/isPrimitive.test.ts ✔️
.isPrimitive()
| Result | Test | Time |
|---|---|---|
| ✔️ | returns true when given primitive value of: null | 0ms |
| ✔️ | returns true when given primitive value of: undefined | 1ms |
| ✔️ | returns true when given primitive value of: 100 | 0ms |
| ✔️ | returns true when given primitive value of: hello world | 0ms |
| ✔️ | returns true when given primitive value of: true | 0ms |
| ✔️ | returns true when given primitive value of: Symbol(a) | 0ms |
| ✔️ | returns true when given primitive value of: 0 | 0ms |
| ✔️ | returns true when given primitive value of: NaN | 0ms |
| ✔️ | returns true when given primitive value of: Infinity | 0ms |
| ✔️ | returns true when given primitive value of: 1n | 0ms |
| ✔️ | returns false when given non primitive value of: {} | 0ms |
| ✔️ | returns false when given non primitive value of: [] | 0ms |
| ✔️ | returns false when given non primitive value of: undefined | 1ms |
| ✔️ | returns false when given non primitive value of: {} | 0ms |
| ✔️ | returns false when given non primitive value of: {} | 0ms |
| ✔️ | returns false when given non primitive value of: {} | 0ms |
| ✔️ | returns false when given non primitive value of: "2021-01-24T19:22:19.272Z" | 0ms |
| ✔️ | returns false when given non primitive value of: {} | 0ms |
packages/jest-haste-map/src/crawlers/tests/node.test.js ✔️
node crawler
| Result | Test | Time |
|---|---|---|
| ✔️ | crawls for files based on patterns | 12ms |
| ✔️ | updates only changed files | 7ms |
| ✔️ | returns removed files | 13ms |
| ✔️ | uses node fs APIs with incompatible find binary | 9ms |
| ✔️ | uses node fs APIs without find binary | 8ms |
| ✔️ | uses node fs APIs if "forceNodeFilesystemAPI" is set to true, regardless of platform | 6ms |
| ✔️ | completes with empty roots | 0ms |
| ✔️ | completes with fs.readdir throwing an error | 11ms |
node crawler readdir withFileTypes support
| Result | Test | Time |
|---|---|---|
| ✔️ | calls lstat for directories and symlinks if readdir withFileTypes is not supported | 7ms |
| ✔️ | avoids calling lstat for directories and symlinks if readdir withFileTypes is supported | 8ms |
e2e/tests/onlyChanged.test.ts ❌
| Result | Test | Time |
|---|---|---|
| ✔️ | run for "onlyChanged" and "changedSince" | 1464ms |
| ✔️ | run only changed files | 5196ms |
| ✔️ | report test coverage for only changed files | 1889ms |
| ✔️ | report test coverage of source on test file change under only changed files | 822ms |
| ✔️ | do not pickup non-tested files when reporting coverage on only changed files | 861ms |
| ✔️ | collect test coverage when using onlyChanged | 1058ms |
| ✔️ | onlyChanged in config is overwritten by --all or testPathPattern | 7023ms |
| ❌ | gets changed files for hg | 3765ms |
| ✔️ | path on Windows is case-insensitive | 0ms |
packages/jest-diff/src/tests/joinAlignedDiffs.test.ts ✔️
joinAlignedDiffsExpand
| Result | Test | Time |
|---|---|---|
| ✔️ | first line is empty common | 1ms |
joinAlignedDiffsNoExpand
| Result | Test | Time |
|---|---|---|
| ✔️ | patch 0 with context 1 and change at start and end | 0ms |
| ✔️ | patch 0 with context 5 and first line is empty common | 7ms |
| ✔️ | patch 1 with context 4 and last line is empty common | 0ms |
| ✔️ | patch 2 with context 3 | 1ms |
| ✔️ | patch 3 with context 2 and omit excess common at start | 0ms |
packages/jest-core/src/tests/SnapshotInteractiveMode.test.js ✔️
SnapshotInteractiveMode
| Result | Test | Time |
|---|---|---|
| ✔️ | is inactive at construction | 1ms |
| ✔️ | call to run process the first file | 1ms |
| ✔️ | call to abort | 11ms |
| ✔️ | call to reset | 1ms |
| ✔️ | press Q or ESC triggers an abort | 0ms |
| ✔️ | press ENTER trigger a run | 0ms |
| ✔️ | skip 1 test, then restart | 2ms |
| ✔️ | skip 1 test, then quit | 2ms |
| ✔️ | update 1 test, then finish and return | 1ms |
| ✔️ | skip 2 tests, then finish and restart | 1ms |
| ✔️ | update 2 tests, then finish and return | 1ms |
| ✔️ | update 1 test, skip 1 test, then finish and restart | 2ms |
| ✔️ | skip 1 test, update 1 test, then finish and restart | 2ms |
packages/jest-runtime/src/tests/Runtime-statics.test.js ✔️
Runtime statics
| Result | Test | Time |
|---|---|---|
| ✔️ | Runtime.createHasteMap passes correct ignore files to HasteMap | 2ms |
| ✔️ | Runtime.createHasteMap passes correct ignore files to HasteMap in watch mode | 1ms |
packages/jest-diff/src/tests/getAlignedDiffs.test.ts ✔️
getAlignedDiffs lines
| Result | Test | Time |
|---|---|---|
| ✔️ | change preceding and following common | 1ms |
| ✔️ | common preceding and following change | 1ms |
| ✔️ | common at end when both current change lines are empty | 0ms |
| ✔️ | common between delete and insert | 0ms |
| ✔️ | common between insert and delete | 0ms |
getAlignedDiffs newline
| Result | Test | Time |
|---|---|---|
| ✔️ | delete only | 1ms |
| ✔️ | insert only | 0ms |
| ✔️ | delete with adjacent change | 0ms |
| ✔️ | insert with adjacent changes | 1ms |
| ✔️ | change from space | 0ms |
| ✔️ | change to space | 0ms |
getAlignedDiffs substrings first
| Result | Test | Time |
|---|---|---|
| ✔️ | common when both current change lines are empty | 1ms |
| ✔️ | common when either current change line is non-empty | 13ms |
| ✔️ | delete completes the current line | 0ms |
| ✔️ | insert completes the current line | 0ms |
getAlignedDiffs substrings middle
| Result | Test | Time |
|---|---|---|
| ✔️ | is empty in delete between common | 0ms |
| ✔️ | is empty in insert at start | 1ms |
| ✔️ | is non-empty in delete at end | 0ms |
| ✔️ | is non-empty in insert between common | 1ms |
getAlignedDiffs substrings last
| Result | Test | Time |
|---|---|---|
| ✔️ | is empty in delete at end | 0ms |
| ✔️ | is empty in insert at end | 1ms |
| ✔️ | is non-empty in common not at end | 0ms |
getAlignedDiffs strings
| Result | Test | Time |
|---|---|---|
| ✔️ | change at start and delete or insert at end | 1ms |
| ✔️ | delete or insert at start and change at end | 1ms |
packages/expect/src/tests/assertionCounts.test.ts ✔️
.assertions()
| Result | Test | Time |
|---|---|---|
| ✔️ | does not throw | 1ms |
| ✔️ | redeclares different assertion count | 1ms |
| ✔️ | expects no assertions | 0ms |
.hasAssertions()
| Result | Test | Time |
|---|---|---|
| ✔️ | does not throw if there is an assertion | 0ms |
| ✔️ | throws if expected is not undefined | 1ms |
| ✔️ | hasAssertions not leaking to global state | 0ms |
packages/jest-haste-map/src/lib/tests/getPlatformExtension.test.js ✔️
getPlatformExtension
| Result | Test | Time |
|---|---|---|
| ✔️ | should get platform ext | 1ms |
packages/jest-haste-map/src/lib/tests/isRegExpSupported.test.js ✔️
isRegExpSupported
| Result | Test | Time |
|---|---|---|
| ✔️ | should return true when passing valid regular expression | 0ms |
| ✔️ | should return false when passing an invalid regular expression | 1ms |
packages/expect/src/tests/stacktrace.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | stack trace points to correct location when using matchers | 4ms |
| ✔️ | stack trace points to correct location when using nested matchers | 21ms |
| ✔️ | stack trace points to correct location when throwing from a custom matcher | 0ms |
packages/jest-worker/src/tests/process-integration.test.js ✔️
Jest Worker Integration
| Result | Test | Time |
|---|---|---|
| ✔️ | calls a single method from the worker | 3ms |
| ✔️ | distributes sequential calls across child processes | 3ms |
| ✔️ | schedules the task on the first available child processes if the scheduling policy is in-order | 15ms |
| ✔️ | distributes concurrent calls across child processes | 2ms |
| ✔️ | sticks parallel calls to children | 7ms |
packages/jest-core/src/lib/tests/isValidPath.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | is valid when it is a file inside roots | 1ms |
| ✔️ | is not valid when it is a snapshot file | 0ms |
| ✔️ | is not valid when it is a file in the coverage dir | 1ms |
packages/jest-util/src/tests/errorWithStack.test.ts ✔️
ErrorWithStack
| Result | Test | Time |
|---|---|---|
| ✔️ | calls Error.captureStackTrace with given callsite when capture exists | 2ms |
packages/jest-util/src/tests/isInteractive.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Returns true when running on interactive environment | 7ms |
| ✔️ | Returns false when running on a non-interactive environment | 1ms |
packages/jest-diff/src/tests/diffStringsRaw.test.ts ✔️
diffStringsRaw
| Result | Test | Time |
|---|---|---|
| ✔️ | one-line with cleanup | 1ms |
| ✔️ | one-line without cleanup | 1ms |
packages/jest-util/src/tests/globsToMatcher.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works like micromatch with only positive globs | 1ms |
| ✔️ | works like micromatch with a mix of overlapping positive and negative globs | 1ms |
| ✔️ | works like micromatch with only negative globs | 1ms |
| ✔️ | works like micromatch with empty globs | 0ms |
packages/jest-core/src/tests/testSchedulerHelper.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | shouldRunInBand() - should return true for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return true for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return false for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return false for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return false for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return true for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return false for runInBand mode | 1ms |
| ✔️ | shouldRunInBand() - should return true for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return true for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return false for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return false for runInBand mode | 0ms |
| ✔️ | shouldRunInBand() - should return true for runInBand mode | 1ms |
packages/jest-util/src/tests/installCommonGlobals.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | returns the passed object | 28ms |
| ✔️ | turns a V8 global object into a Node global object | 1ms |
packages/jest-haste-map/src/tests/get_mock_name.test.js ✔️
getMockName
| Result | Test | Time |
|---|---|---|
| ✔️ | extracts mock name from file path | 0ms |
packages/jest-worker/src/tests/WorkerPool.test.js ✔️
WorkerPool
| Result | Test | Time |
|---|---|---|
| ✔️ | should create a ChildProcessWorker and send to it | 1ms |
| ✔️ | should create a NodeThreadWorker and send to it | 1ms |
| ✔️ | should avoid NodeThreadWorker if not passed enableWorkerThreads | 1ms |
packages/jest-haste-map/src/lib/tests/dependencyExtractor.test.js ✔️
dependencyExtractor
| Result | Test | Time |
|---|---|---|
| ✔️ | should not extract dependencies inside comments | 1ms |
| ✔️ | should not extract dependencies inside comments (windows line endings) | 0ms |
| ✔️ | should not extract dependencies inside comments (unicode line endings) | 1ms |
| ✔️ | should extract dependencies from import statements |
0ms |
| ✔️ | should extract dependencies from side-effect only import statements |
0ms |
| ✔️ | should not extract dependencies from import type/typeof statements |
1ms |
| ✔️ | should extract dependencies from export statements |
0ms |
| ✔️ | should extract dependencies from export-from statements |
0ms |
| ✔️ | should not extract dependencies from export type/typeof statements |
0ms |
| ✔️ | should extract dependencies from dynamic import calls |
1ms |
| ✔️ | should extract dependencies from require calls |
0ms |
| ✔️ | should extract dependencies from jest.requireActual calls |
0ms |
| ✔️ | should extract dependencies from jest.requireMock calls |
0ms |
| ✔️ | should extract dependencies from jest.genMockFromModule calls |
1ms |
| ✔️ | should extract dependencies from jest.createMockFromModule calls |
0ms |
packages/jest-haste-map/src/lib/tests/normalizePathSep.test.js ✔️
normalizePathSep
| Result | Test | Time |
|---|---|---|
| ✔️ | does nothing on posix | 1ms |
| ✔️ | replace slashes on windows | 1ms |
packages/jest-haste-map/src/lib/tests/fast_path.test.js ✔️
fastPath.relative
| Result | Test | Time |
|---|---|---|
| ✔️ | should get relative paths inside the root | 0ms |
| ✔️ | should get relative paths outside the root | 0ms |
| ✔️ | should get relative paths outside the root when start with same word | 1ms |
fastPath.resolve
| Result | Test | Time |
|---|---|---|
| ✔️ | should get the absolute path for paths inside the root | 0ms |
| ✔️ | should get the absolute path for paths outside the root | 0ms |
packages/jest-core/src/tests/FailedTestsCache.test.js ✔️
FailedTestsCache
| Result | Test | Time |
|---|---|---|
| ✔️ | should filter tests | 1ms |
packages/jest-core/src/tests/getNoTestsFoundMessage.test.js ✔️
getNoTestsFoundMessage
| Result | Test | Time |
|---|---|---|
| ✔️ | returns correct message when monitoring only failures | 1ms |
| ✔️ | returns correct message when monitoring only changed | 0ms |
| ✔️ | returns correct message with verbose option | 1ms |
| ✔️ | returns correct message without options | 0ms |
| ✔️ | returns correct message with passWithNoTests | 1ms |
packages/jest-core/src/tests/globals.test.ts ✔️
Common globals
| Result | Test | Time |
|---|---|---|
| ✔️ | check process | 1ms |
packages/jest-core/src/lib/tests/logDebugMessages.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints the jest version | 1ms |
| ✔️ | prints the test framework name | 0ms |
| ✔️ | prints the config object | 1ms |
packages/jest-util/src/tests/isPromise.test.ts ✔️
not a Promise:
| Result | Test | Time |
|---|---|---|
| ✔️ | undefined | 0ms |
| ✔️ | null | 0ms |
| ✔️ | true | 1ms |
| ✔️ | 42 | 0ms |
| ✔️ | "1337" | 0ms |
| ✔️ | Symbol() | 0ms |
| ✔️ | [] | 0ms |
| ✔️ | {} | 1ms |
| Result | Test | Time |
|---|---|---|
| ✔️ | a resolved Promise | 0ms |
| ✔️ | a rejected Promise | 0ms |
packages/jest-cli/src/init/tests/modifyPackageJson.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should remove jest config if exists | 1ms |
| ✔️ | should add test script when there are no scripts | 0ms |
| ✔️ | should add test script when there are scripts | 0ms |
| ✔️ | should not add test script when { shouldModifyScripts: false } | 0ms |
packages/expect/src/tests/symbolInObjects.test.ts ✔️
Symbol in objects
| Result | Test | Time |
|---|---|---|
| ✔️ | should compare objects with Symbol keys | 0ms |
| ✔️ | should compare objects with mixed keys and Symbol | 1ms |
| ✔️ | should compare objects with different Symbol keys | 0ms |
e2e/test-in-root/test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | stub | 1ms |
e2e/test-in-root/spec.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | stub | 1ms |
e2e/v8-coverage/empty-sourcemap/test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | dummy-test | 0ms |
packages/jest-matcher-utils/src/tests/deepCyclicCopyReplaceableDom.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should copy dom element | 2ms |
| ✔️ | should copy complex element | 3ms |
e2e/tests/nativeEsmTypescript.test.ts ✔️
on node ^12.16.0 || >=13.7.0
| Result | Test | Time |
|---|---|---|
| ✔️ | runs TS test with native ESM | 923ms |
e2e/tests/coverageRemapping.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | maps code coverage against original source | 12660ms |
e2e/tests/globalTeardown.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | globalTeardown is triggered once after all test suites | 2025.9999999999998ms |
| ✔️ | jest throws an error when globalTeardown does not export a function | 1144ms |
| ✔️ | globalTeardown function gets jest config object as a parameter | 959ms |
| ✔️ | should call globalTeardown function of multiple projects | 1711ms |
| ✔️ | should not call a globalTeardown of a project if there are no tests to run from this project | 882ms |
| ✔️ | globalTeardown works with default export | 1045ms |
| ✔️ | globalTeardown throws with named export | 1041ms |
e2e/tests/multiProjectRunner.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | --listTests doesn't duplicate the test files | 445ms |
| ✔️ | can pass projects or global config | 3379ms |
| ✔️ | "No tests found" message for projects | 977ms |
| ✔️ | allows a single non-root project | 1215ms |
| ✔️ | allows a single non-root project | 751ms |
| ✔️ | correctly runs a single non-root project | 805ms |
| ✔️ | correctly runs a single non-root project | 839ms |
| ✔️ | projects can be workspaces with non-JS/JSON files | 1371ms |
| ✔️ | objects in project configuration | 869ms |
| ✔️ | allows a single project | 822ms |
| ✔️ | resolves projects and their properly | 1938ms |
| ✔️ | Does transform files with the corresponding project transformer | 737ms |
doesn't bleed module file extensions resolution with multiple workers
| Result | Test | Time |
|---|---|---|
| ✔️ | external config files | 1025ms |
| ✔️ | inline config files | 1101ms |
e2e/tests/toMatchSnapshot.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | basic support | 3007ms |
| ✔️ | error thrown before snapshot | 2377ms |
| ✔️ | first snapshot fails, second passes | 1373ms |
| ✔️ | does not mark snapshots as obsolete in skipped tests | 1244ms |
| ✔️ | accepts custom snapshot name | 821ms |
| ✔️ | handles property matchers | 1917ms |
| ✔️ | handles invalid property matchers | 1906ms |
| ✔️ | handles property matchers with hint | 1752ms |
| ✔️ | handles property matchers with deep properties | 2528ms |
e2e/tests/detectOpenHandles.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints message about flag on slow tests | 1993ms |
| ✔️ | prints message about flag on forceExit | 678ms |
| ✔️ | prints out info about open handlers | 868ms |
| ✔️ | does not report promises | 728ms |
| ✔️ | prints out info about open handlers from inside tests | 903ms |
on node >=11.10.0
| Result | Test | Time |
|---|---|---|
| ✔️ | does not report ELD histograms | 729ms |
notify
| Result | Test | Time |
|---|---|---|
| ✔️ | does not report --notify flag | 789ms |
on node >=11
| Result | Test | Time |
|---|---|---|
| ✔️ | does not report timeouts using unref | 763ms |
e2e/tests/failures.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | not throwing Error objects | 4615ms |
| ✔️ | works with node assert | 854ms |
| ✔️ | works with assertions in separate files | 765ms |
| ✔️ | works with async failures | 983ms |
| ✔️ | works with snapshot failures | 782ms |
| ✔️ | works with snapshot failures with hint | 784ms |
| ✔️ | errors after test has completed | 782ms |
e2e/tests/console.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | console printing | 755ms |
| ✔️ | console printing with --verbose | 943ms |
| ✔️ | does not print to console with --silent | 855ms |
| ✔️ | respects --noStackTrace | 974ms |
| ✔️ | respects noStackTrace in config | 1008ms |
| ✔️ | the jsdom console is the same as the test console | 1429ms |
| ✔️ | does not error out when using winston | 2049ms |
e2e/tests/globals.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | basic test constructs | 762ms |
| ✔️ | interleaved describe and test children order | 704ms |
| ✔️ | skips | 685ms |
| ✔️ | only | 827ms |
| ✔️ | cannot have describe with no implementation | 682ms |
| ✔️ | cannot test with no implementation | 701ms |
| ✔️ | skips with expand arg | 683ms |
| ✔️ | only with expand arg | 701ms |
| ✔️ | cannot test with no implementation with expand arg | 663ms |
| ✔️ | function as descriptor | 752ms |
e2e/tests/coverageThreshold.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | exits with 1 if coverage threshold is not met | 963ms |
| ✔️ | exits with 1 if path threshold group is not found in coverage data | 962ms |
| ✔️ | exits with 0 if global threshold group is not found in coverage data | 847ms |
| ✔️ | excludes tests matched by path threshold groups from global group | 1174ms |
| ✔️ | file is matched by all path and glob threshold groups | 836ms |
e2e/tests/testPathPatternReporterMessage.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints a message with path pattern at the end | 3030ms |
e2e/tests/filter.test.ts ✔️
Dynamic test filtering
| Result | Test | Time |
|---|---|---|
| ✔️ | uses the default JSON option | 1044ms |
| ✔️ | uses the CLI option | 786ms |
| ✔️ | ignores the filter if requested to do so | 880ms |
| ✔️ | throws when you return clowny stuff | 361ms |
| ✔️ | will call setup on filter before filtering | 1544ms |
| ✔️ | will print error when filter throws | 369ms |
| ✔️ | will return no results when setup hook throws | 354ms |
e2e/tests/selectProjects.test.ts ✔️
Given a config with two named projects, first-project and second-project when Jest is started with --selectProjects first-project
| Result | Test | Time |
|---|---|---|
| ✔️ | runs the tests in the first project only | 1ms |
| ✔️ | prints that only first-project will run | 0ms |
Given a config with two named projects, first-project and second-project when Jest is started with --selectProjects second-project
| Result | Test | Time |
|---|---|---|
| ✔️ | runs the tests in the second project only | 1ms |
| ✔️ | prints that only second-project will run | 0ms |
Given a config with two named projects, first-project and second-project when Jest is started with --selectProjects first-project second-project
| Result | Test | Time |
|---|---|---|
| ✔️ | runs the tests in the first and second projects | 0ms |
| ✔️ | prints that both first-project and second-project will run | 1ms |
Given a config with two named projects, first-project and second-project when Jest is started without providing --selectProjects
| Result | Test | Time |
|---|---|---|
| ✔️ | runs the tests in the first and second projects | 1ms |
| ✔️ | does not print which projects are run | 0ms |
Given a config with two named projects, first-project and second-project when Jest is started with --selectProjects third-project
| Result | Test | Time |
|---|---|---|
| ✔️ | fails | 0ms |
| ✔️ | prints that no project was found | 1ms |
Given a config with two projects, first-project and an unnamed project when Jest is started with --selectProjects first-project
| Result | Test | Time |
|---|---|---|
| ✔️ | runs the tests in the first project only | 1ms |
| ✔️ | prints that a project does not have a name | 0ms |
| ✔️ | prints that only first-project will run | 0ms |
Given a config with two projects, first-project and an unnamed project when Jest is started without providing --selectProjects
| Result | Test | Time |
|---|---|---|
| ✔️ | runs the tests in the first and second projects | 4ms |
| ✔️ | does not print that a project has no name | 0ms |
Given a config with two projects, first-project and an unnamed project when Jest is started with --selectProjects third-project
| Result | Test | Time |
|---|---|---|
| ✔️ | fails | 1ms |
| ✔️ | prints that a project does not have a name | 0ms |
| ✔️ | prints that no project was found | 0ms |
e2e/tests/mockNames.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | suite without mock name, mock called | 872ms |
| ✔️ | suite without mock name, mock not called | 864ms |
| ✔️ | suite with mock name, expect mock not called | 755ms |
| ✔️ | suite with mock name, mock called, expect fail | 721ms |
| ✔️ | suite with mock name, mock called 5 times | 766ms |
| ✔️ | suite with mock name, mock not called 5 times, expect fail | 948ms |
| ✔️ | suite with mock name, mock called | 848ms |
| ✔️ | suite with mock name, mock not called | 948ms |
e2e/tests/stackTrace.test.ts ✔️
Stack Trace
| Result | Test | Time |
|---|---|---|
| ✔️ | prints a stack trace for runtime errors | 958ms |
| ✔️ | does not print a stack trace for runtime errors when --noStackTrace is given | 606ms |
| ✔️ | prints a stack trace for matching errors | 714ms |
| ✔️ | does not print a stack trace for matching errors when --noStackTrace is given | 599ms |
| ✔️ | prints a stack trace for errors | 643ms |
| ✔️ | prints a stack trace for errors without message in stack trace | 602ms |
| ✔️ | does not print a stack trace for errors when --noStackTrace is given | 520ms |
e2e/tests/each.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with passing tests | 882ms |
| ✔️ | shows error message when not enough arguments are supplied to tests | 597ms |
| ✔️ | shows the correct errors in stderr when failing tests | 769ms |
| ✔️ | shows only the tests with .only as being ran | 653ms |
| ✔️ | shows only the tests without .skip as being ran | 612ms |
| ✔️ | runs only the describe.only.each tests | 562ms |
| ✔️ | formats args with pretty format when given %p | 580ms |
e2e/tests/toThrowErrorMatchingInlineSnapshot.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works fine when function throws error | 1138ms |
| ✔️ | updates existing snapshot | 844ms |
| ✔️ | cannot be used with .not | 680ms |
| ✔️ | should support rejecting promises | 808ms |
e2e/tests/watchModeNoAccess.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not re-run tests when only access time is modified | 4313ms |
e2e/tests/pnp.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | successfully runs the tests inside pnp/ |
2547ms |
e2e/tests/declarationErrors.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | errors if describe returns a Promise | 781ms |
| ✔️ | errors if describe returns something | 709ms |
| ✔️ | errors if describe throws | 778ms |
e2e/tests/wrongEnv.test.ts ✔️
Wrong globals for environment
| Result | Test | Time |
|---|---|---|
| ✔️ | print useful error for window | 736ms |
| ✔️ | print useful error for document | 533ms |
| ✔️ | print useful error for navigator | 606ms |
| ✔️ | print useful error for unref | 1301ms |
| ✔️ | print useful error when it explodes during evaluation | 659ms |
e2e/tests/setupFilesAfterEnvConfig.test.ts ✔️
setupFilesAfterEnv
| Result | Test | Time |
|---|---|---|
| ✔️ | requires multiple setup files before each file in the suite | 1063ms |
| ✔️ | requires setup files after the test runners are required | 800ms |
e2e/tests/noTestsFound.test.ts ✔️
No tests are found
| Result | Test | Time |
|---|---|---|
| ✔️ | fails the test suite in standard situation | 488ms |
| ✔️ | doesn't fail the test suite if --passWithNoTests passed | 518ms |
| ✔️ | doesn't fail the test suite if using --lastCommit | 608ms |
| ✔️ | doesn't fail the test suite if using --onlyChanged | 565ms |
| ✔️ | doesn't fail the test suite if using --findRelatedTests | 505ms |
e2e/tests/customMatcherStackTrace.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with custom matchers | 873ms |
| ✔️ | custom async matchers | 623ms |
e2e/tests/nestedTestDefinitions.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | print correct error message with nested test definitions outside describe | 1354ms |
| ✔️ | print correct error message with nested test definitions inside describe | 1088ms |
| ✔️ | print correct message when nesting describe inside it | 1047ms |
| ✔️ | print correct message when nesting a hook inside it | 1027ms |
e2e/tests/autoClearMocks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | suite with auto-clear | 801ms |
| ✔️ | suite without auto-clear | 837ms |
e2e/tests/forceExit.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | exits the process after test are done but before timers complete | 2157ms |
e2e/tests/testFailureExitCode.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | exits with a specified code when test fail | 2073ms |
| ✔️ | exits with a specified code when bailing from a failed test | 2188ms |
e2e/tests/promiseReject.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | 905ms |
e2e/tests/timerResetMocks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | run timers after resetAllMocks test | 944ms |
| ✔️ | run timers with resetMocks in config test | 814ms |
e2e/tests/testEnvironmentAsync.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | triggers setup/teardown hooks | 1422ms |
e2e/tests/resolveNoFileExtensions.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | show error message with matching files | 1064ms |
| ✔️ | show error message when no js moduleFileExtensions | 117ms |
e2e/tests/nestedEventLoop.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with nested event loops | 1392ms |
e2e/tests/useStderr.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | no tests found message is redirected to stderr | 1257ms |
e2e/tests/domDiffing.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should work without error | 1310ms |
e2e/tests/consoleAfterTeardown.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | console printing | 1301ms |
e2e/tests/testInRoot.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | runs tests in only test.js and spec.js | 944ms |
e2e/tests/requireMainIsolateModules.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | require.main on using jest.isolateModules should not be undefined |
867ms |
e2e/tests/clearCache.test.ts ✔️
jest --clearCache
| Result | Test | Time |
|---|---|---|
| ✔️ | normal run results in cache directory being written | 792ms |
| ✔️ | clearCache results in deleted directory and exitCode 0 | 127ms |
e2e/tests/runtimeInternalModuleRegistry.test.ts ✔️
Runtime Internal Module Registry
| Result | Test | Time |
|---|---|---|
| ✔️ | correctly makes use of internal module registry when requiring modules | 1150ms |
e2e/tests/resolveNodeModule.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | resolve node module | 890ms |
e2e/tests/setImmediate.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | setImmediate | 859ms |
e2e/tests/emptySuiteError.test.ts ✔️
JSON Reporter
| Result | Test | Time |
|---|---|---|
| ✔️ | fails the test suite if it contains no tests | 824ms |
e2e/tests/badSourceMap.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | suite with test cases that contain malformed sourcemaps | 823ms |
e2e/tests/timerUseRealTimers.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | useRealTimers cancels "timers": "fake" for whole test file | 986ms |
e2e/tests/global-mutation.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | can redefine global | 1ms |
e2e/tests/runProgrammatically.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | run Jest programmatically cjs | 75ms |
| ✔️ | run Jest programmatically esm | 462ms |
e2e/tests/symbol.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Symbol deletion | 0ms |
e2e/tests/hasteMapMockChanged.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should not warn when a mock file changes | 298ms |
e2e/tests/existentRoots.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | error when rootDir does not exist | 109ms |
| ✔️ | error when rootDir is a file | 109ms |
| ✔️ | error when roots directory does not exist | 137ms |
| ✔️ | error when roots is a file | 129ms |
e2e/tests/doneInHooks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | done() works properly in hooks |
819ms |
e2e/tests/testEnvironmentCircusAsync.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | calls asynchronous handleTestEvent in testEnvironment | 1458ms |
e2e/tests/moduleNameMapper.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | moduleNameMapper wrong configuration | 1030ms |
| ✔️ | moduleNameMapper wrong array configuration | 909ms |
| ✔️ | moduleNameMapper correct configuration | 913ms |
| ✔️ | moduleNameMapper correct configuration mocking module of absolute path | 1479ms |
| ✔️ | moduleNameMapper with mocking | 967ms |
e2e/tests/customReporters.test.ts ✔️
Custom Reporters Integration
| Result | Test | Time |
|---|---|---|
| ✔️ | valid string format for adding reporters | 966ms |
| ✔️ | valid array format for adding reporters | 623ms |
| ✔️ | invalid format for adding reporters | 115ms |
| ✔️ | default reporters enabled | 620ms |
| ✔️ | TestReporter with all tests passing | 978ms |
| ✔️ | TestReporter with all tests failing | 1093ms |
| ✔️ | IncompleteReporter for flexibility | 801ms |
| ✔️ | reporters can be default exports | 792ms |
| ✔️ | prints reporter errors | 495ms |
e2e/tests/findRelatedFiles.test.ts ✔️
--findRelatedTests flag
| Result | Test | Time |
|---|---|---|
| ✔️ | runs tests related to filename | 1324ms |
| ✔️ | runs tests related to uppercased filename on case-insensitive os | 1ms |
| ✔️ | runs tests related to filename with a custom dependency extractor | 1307ms |
| ✔️ | generates coverage report for filename | 2001.9999999999998ms |
| ✔️ | coverage configuration is applied correctly | 1516ms |
e2e/tests/env.test.ts ✔️
Environment override
| Result | Test | Time |
|---|---|---|
| ✔️ | uses jsdom when specified | 1501ms |
| ✔️ | uses node as default from package.json | 1002ms |
| ✔️ | uses node when specified | 664ms |
| ✔️ | fails when the env is not available | 121ms |
Environment equivalent
| Result | Test | Time |
|---|---|---|
| ✔️ | uses jsdom | 1092ms |
| ✔️ | uses node | 731ms |
e2e/tests/globalSetup.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | globalSetup is triggered once before all test suites | 2384ms |
| ✔️ | jest throws an error when globalSetup does not export a function | 851ms |
| ✔️ | globalSetup function gets jest config object as a parameter | 918ms |
| ✔️ | should call globalSetup function of multiple projects | 1307ms |
| ✔️ | should not call a globalSetup of a project if there are no tests to run from this project | 1189ms |
| ✔️ | should not call any globalSetup if there are no tests to run | 792ms |
| ✔️ | globalSetup works with default export | 926ms |
| ✔️ | globalSetup throws with named export | 783ms |
| ✔️ | should not transpile the transformer | 718ms |
| ✔️ | should transform node_modules if configured by transformIgnorePatterns | 1165ms |
e2e/tests/workerForceExit.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints a warning if a worker is force exited | 2355ms |
| ✔️ | force exits a worker that fails to exit gracefully | 2319ms |
e2e/tests/babelPluginJestHoist.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | successfully runs the tests inside babel-plugin-jest-hoist/ |
6179ms |
e2e/tests/coverageTransformInstrumented.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | code coverage for transform instrumented code | 4910ms |
e2e/tests/timeoutsLegacy.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not work on jest-circus | 2ms |
| ✖️ | exceeds the timeout set using jasmine.DEFAULT_TIMEOUT_INTERVAL | 0ms |
| ✖️ | does not exceed the timeout using jasmine.DEFAULT_TIMEOUT_INTERVAL | 0ms |
| ✖️ | can read and write jasmine.DEFAULT_TIMEOUT_INTERVAL | 0ms |
e2e/tests/asyncRegenerator.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | successfully transpiles async | 4040ms |
e2e/tests/toThrowErrorMatchingSnapshot.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works fine when function throws error | 790ms |
| ✔️ | throws the error if tested function didn't throw error | 713ms |
| ✔️ | accepts custom snapshot name | 653ms |
| ✔️ | cannot be used with .not | 644ms |
| ✔️ | should support rejecting promises | 647ms |
e2e/tests/testTodo.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with all statuses | 891ms |
| ✔️ | shows error messages when called with no arguments | 602ms |
| ✔️ | shows error messages when called with multiple arguments | 669ms |
| ✔️ | shows error messages when called with invalid argument | 624ms |
| ✔️ | shows todo messages when in verbose mode | 710ms |
e2e/tests/onlyFailuresNonWatch.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | onlyFailures flag works in non-watch mode | 2841ms |
e2e/tests/presets.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | supports json preset | 860ms |
| ✔️ | supports js preset | 956ms |
e2e/tests/expectAsyncMatcher.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with passing tests | 1173ms |
| ✔️ | shows the correct errors in stderr when failing tests | 760ms |
e2e/tests/transform.test.ts ✔️
babel-jest
| Result | Test | Time |
|---|---|---|
| ✔️ | runs transpiled code | 2241ms |
| ✔️ | instruments only specific files and collects coverage | 2589ms |
babel-jest ignored
| Result | Test | Time |
|---|---|---|
| ✔️ | tells user to match ignored files | 940ms |
babel-jest with manual transformer
| Result | Test | Time |
|---|---|---|
| ✔️ | runs transpiled code | 1608ms |
no babel-jest
| Result | Test | Time |
|---|---|---|
| ✔️ | fails with syntax error on flow types | 1343ms |
| ✔️ | instrumentation with no babel-jest | 1378ms |
custom transformer
| Result | Test | Time |
|---|---|---|
| ✔️ | proprocesses files | 673ms |
| ✔️ | instruments files | 706ms |
multiple-transformers
| Result | Test | Time |
|---|---|---|
| ✔️ | transforms dependencies using specific transformers | 7383ms |
ecmascript-modules-support
| Result | Test | Time |
|---|---|---|
| ✔️ | runs transpiled code | 923ms |
transformer-config
| Result | Test | Time |
|---|---|---|
| ✔️ | runs transpiled code | 1636ms |
| ✔️ | instruments only specific files and collects coverage | 1588ms |
transformer caching
| Result | Test | Time |
|---|---|---|
| ✔️ | does not rerun transform within worker | 1033ms |
transform-environment
| Result | Test | Time |
|---|---|---|
| ✔️ | should transform the environment | 1044ms |
transform-runner
| Result | Test | Time |
|---|---|---|
| ✔️ | should transform runner | 795ms |
transform-testrunner
| Result | Test | Time |
|---|---|---|
| ✔️ | should transform testRunner | 783ms |
e2e/tests/chaiAssertionLibrary.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | chai assertion errors should display properly | 1817ms |
e2e/tests/stackTraceSourceMapsWithCoverage.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | processes stack traces and code frames with source maps with coverage | 2394ms |
e2e/tests/customTestSequencers.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | run prioritySequence first sync | 933ms |
| ✔️ | run prioritySequence first async | 901ms |
| ✔️ | run failed tests async | 849ms |
e2e/tests/beforeAllFiltered.ts ✔️
Correct BeforeAll run
| Result | Test | Time |
|---|---|---|
| ✔️ | ensures the BeforeAll of ignored suite is not run | 905ms |
e2e/tests/fakePromises.test.ts ✔️
Fake promises
| Result | Test | Time |
|---|---|---|
| ✔️ | should be possible to resolve with fake timers using immediates | 901ms |
| ✔️ | should be possible to resolve with fake timers using asap | 780ms |
e2e/tests/stackTraceSourceMaps.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | processes stack traces and code frames with source maps | 2153ms |
e2e/tests/dynamicRequireDependencies.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | successfully runs tests with dynamic dependencies | 811ms |
e2e/tests/overrideGlobals.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | overriding native promise does not freeze Jest | 1116ms |
| ✔️ | has a duration even if time is faked | 859ms |
e2e/tests/executeTestsOnceInMpr.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Tests are executed only once even in an MPR | 908ms |
e2e/tests/moduleParentNullInTest.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | module.parent should be null in test files | 830ms |
e2e/tests/requireAfterTeardown.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints useful error for requires after test is done | 842ms |
e2e/tests/lifecycles.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | suite with invalid assertions in afterAll | 827ms |
e2e/tests/hasteMapSha1.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | exits the process after test are done but before timers complete | 187ms |
e2e/tests/json.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | JSON is available in the global scope | 1ms |
| ✔️ | JSON.parse creates objects from within this context | 0ms |
e2e/tests/testResultsProcessor.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | testNamePattern | 859ms |
e2e/tests/debug.test.ts ✔️
jest --debug
| Result | Test | Time |
|---|---|---|
| ✔️ | outputs debugging info before running the test | 857ms |
e2e/tests/importedGlobals.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | imported globals | 1012ms |
e2e/tests/customResolver.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | use the custom resolver | 749ms |
e2e/tests/circularInequality.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | handles circular inequality properly | 1407ms |
e2e/tests/injectGlobals.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | globals are undefined if passed false from CLI |
876ms |
| ✔️ | globals are undefined if passed false from config |
918ms |
e2e/tests/skipBeforeAfterAll.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | correctly skip beforeAlls in skipped tests |
998ms |
e2e/tests/customInlineSnapshotMatchers.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with custom inline snapshot matchers | 2145ms |
e2e/tests/regexCharInPath.test.ts ✔️
Regex Char In Path
| Result | Test | Time |
|---|---|---|
| ✔️ | parses paths containing regex chars correctly | 873ms |
e2e/tests/noTestFound.test.ts ✔️
Coverage Report
| Result | Test | Time |
|---|---|---|
| ✔️ | outputs coverage report | 551ms |
File path not found in mulit-project scenario
| Result | Test | Time |
|---|---|---|
| ✔️ | outputs coverage report | 463ms |
e2e/tests/nativeEsm.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | test config is without transform | 133ms |
on node ^12.16.0 || >=13.7.0
| Result | Test | Time |
|---|---|---|
| ✔️ | runs test with native ESM | 690ms |
on node >=14.3.0
| Result | Test | Time |
|---|---|---|
| ✖️ | supports top-level await | 0ms |
e2e/tests/supportsDashedArgs.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with passing tests | 777ms |
| ✔️ | throws error for unknown dashed & camelcase args | 119ms |
e2e/tests/transformLinkedModules.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should transform linked modules | 734ms |
e2e/tests/testNamePattern.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | testNamePattern | 788ms |
e2e/tests/nativeAsyncMock.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | mocks async functions | 0ms |
e2e/tests/hasteMapSize.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | reports the correct file size | 83ms |
| ✔️ | updates the file size when a file changes | 217ms |
e2e/tests/circusDeclarationErrors.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | defining tests and hooks asynchronously throws | 832ms |
e2e/tests/testEnvironmentCircus.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | calls testEnvironment handleTestEvent | 1456ms |
e2e/tests/callDoneTwice.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | done() should not be called more than once |
820ms |
e2e/tests/emptyDescribeWithHooks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | hook in empty describe | 829ms |
| ✔️ | hook in describe with skipped test | 614ms |
| ✔️ | hook in empty nested describe | 680ms |
| ✔️ | multiple hooks in empty describe | 726ms |
e2e/tests/errorOnDeprecated.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not work on jest-circus | 4ms |
| ✖️ | fail.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.addMatchers.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.any.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.anything.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.arrayContaining.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.createSpy.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.objectContaining.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.stringMatching.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | pending.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | spyOn.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | spyOnProperty.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | defaultTimeoutInterval.test.js errors in errorOnDeprecated mode | 0ms |
| ✖️ | fail.test.js errors when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.addMatchers.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.any.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.anything.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.arrayContaining.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.createSpy.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.objectContaining.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | jasmine.stringMatching.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | pending.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | spyOn.test.js passes when not in errorOnDeprecated mode | 0ms |
| ✖️ | spyOnProperty.test.js errors when not in errorOnDeprecated mode | 0ms |
| ✖️ | defaultTimeoutInterval.test.js passes when not in errorOnDeprecated mode | 0ms |
e2e/tests/testRetries.test.ts ✔️
Test Retries
| Result | Test | Time |
|---|---|---|
| ✔️ | retries failed tests | 859ms |
| ✔️ | reporter shows more than 1 invocation if test is retried | 829ms |
| ✔️ | reporter shows 1 invocation if tests are not retried | 811ms |
| ✔️ | tests are not retried if beforeAll hook failure occurs | 706ms |
e2e/tests/jest.config.ts.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with jest.config.ts | 3356ms |
| ✔️ | works with tsconfig.json | 3224ms |
| ✔️ | traverses directory tree up until it finds jest.config | 3116ms |
| ✔️ | it does type check the config | 2278ms |
| ✔️ | invalid JS in jest.config.ts | 2200ms |
e2e/tests/coverageReport.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | outputs coverage report | 2076ms |
| ✔️ | collects coverage only from specified file | 1646ms |
| ✔️ | collects coverage only from multiple specified files | 1587ms |
| ✔️ | collects coverage only from specified files avoiding dependencies | 1173ms |
| ✔️ | json reporter printing with --coverage | 898ms |
| ✔️ | outputs coverage report as json | 1824ms |
| ✔️ | outputs coverage report when text is requested | 1872ms |
| ✔️ | outputs coverage report when text-summary is requested | 1850ms |
| ✔️ | outputs coverage report when text and text-summary is requested | 1827ms |
| ✔️ | does not output coverage report when html is requested | 2021ms |
| ✔️ | collects coverage from duplicate files avoiding shared cache | 2245ms |
| ✔️ | generates coverage when using the testRegex config param | 2300ms |
e2e/tests/toMatchInlineSnapshot.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | basic support | 4442ms |
| ✔️ | do not indent empty lines | 1940ms |
| ✔️ | handles property matchers | 3820ms |
| ✔️ | removes obsolete external snapshots | 3007ms |
| ✔️ | supports async matchers | 895ms |
| ✔️ | supports async tests | 1117ms |
| ✔️ | writes snapshots with non-literals in expect(...) | 897ms |
| ✔️ | handles mocking native modules prettier relies on | 1142ms |
| ✔️ | supports custom matchers | 2263ms |
| ✔️ | supports custom matchers with property matcher | 1950ms |
| ✔️ | multiple custom matchers and native matchers | 1385ms |
| ✔️ | indentation is correct in the presences of existing snapshots | 932ms |
examples/react-native/tests/intro.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | renders correctly | 478ms |
| ✔️ | renders the ActivityIndicator component | 106ms |
| ✔️ | renders the TextInput component | 2887ms |
| ✔️ | renders the FlatList component | 791ms |
e2e/tests/toMatchInlineSnapshotWithRetries.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with a single snapshot | 2009ms |
| ✔️ | works when a different assertion is failing | 600ms |
| ✔️ | works when multiple tests have snapshots but only one of them failed multiple times | 1640ms |
e2e/tests/timeouts.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | exceeds the timeout | 782ms |
| ✔️ | does not exceed the timeout | 664ms |
| ✔️ | exceeds the command line testTimeout | 1529ms |
| ✔️ | does not exceed the command line testTimeout | 856ms |
e2e/tests/toMatchSnapshotWithStringSerializer.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | empty external | 1636ms |
| ✔️ | empty internal ci false | 1213ms |
| ✔️ | undefined internal ci true | 598ms |
e2e/tests/jasmineAsync.test.ts ✔️
async jasmine
| Result | Test | Time |
|---|---|---|
| ✔️ | works with beforeAll | 1317ms |
| ✔️ | works with beforeEach | 673ms |
| ✔️ | works with afterAll | 1151ms |
| ✔️ | works with afterEach | 638ms |
| ✔️ | works with fit | 936ms |
| ✔️ | works with xit | 738ms |
| ✔️ | throws when not a promise is returned | 670ms |
| ✔️ | tests async promise code | 10831ms |
| ✔️ | works with concurrent | 757ms |
| ✔️ | works with concurrent within a describe block when invoked with testNamePattern | 686ms |
| ✔️ | works with concurrent.each | 717ms |
| ✔️ | works with concurrent.only.each | 1171ms |
| ✔️ | doesn't execute more than 5 tests simultaneously | 976ms |
| ✔️ | async test fails | 6223ms |
| ✔️ | generator test | 688ms |
e2e/tests/config.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | config as JSON | 381ms |
| ✔️ | works with sane config JSON | 621ms |
| ✔️ | watchman config option is respected over default argv | 640ms |
| ✔️ | config from argv is respected with sane config JSON | 530ms |
| ✔️ | works with jsdom testEnvironmentOptions config JSON | 1558ms |
| ✔️ | negated flags override previous flags | 156ms |
e2e/tests/fatalWorkerError.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | fails a test that terminates the worker with a fatal error | 3117ms |
e2e/tests/toMatchSnapshotWithRetries.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with a single snapshot | 2153ms |
| ✔️ | works when multiple tests have snapshots but only one of them failed multiple times | 2208ms |
e2e/tests/watchModePatterns.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | can press "p" to filter by file name | 1471ms |
| ✔️ | can press "t" to filter by test name | 1775ms |
e2e/tests/unexpectedToken.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | triggers unexpected token error message for non-JS assets | 980ms |
| ✔️ | triggers unexpected token error message for untranspiled node_modules | 794ms |
| ✔️ | does not trigger unexpected token error message for regular syntax errors | 1539ms |
e2e/tests/jestRequireMock.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | understands dependencies using jest.requireMock | 1909ms |
e2e/tests/typescriptCoverage.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | instruments and collects coverage for typescript files | 2830ms |
e2e/tests/jest.config.js.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with jest.config.js | 1016ms |
| ✔️ | traverses directory tree up until it finds jest.config | 882ms |
| ✔️ | invalid JS in jest.config.js | 135ms |
e2e/tests/requireMainResetModules.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | require.main on using --resetModules='true' should not be undefined |
970ms |
| ✔️ | require.main on using jest.resetModules() should not be undefined |
915ms |
e2e/tests/modernFakeTimers.test.ts ✔️
modern implementation of fake timers
| Result | Test | Time |
|---|---|---|
| ✔️ | should be possible to use modern implementation from config | 792ms |
| ✔️ | should be possible to use modern implementation from jest-object | 831ms |
e2e/tests/runTestsByPath.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | runs tests by exact path | 1938ms |
e2e/tests/testEnvironment.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | respects testEnvironment docblock | 1513ms |
e2e/tests/circusConcurrentEach.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with concurrent.each | 817ms |
| ✔️ | works with concurrent.only.each | 695ms |
e2e/tests/autoRestoreMocks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | suite with auto-restore | 822ms |
| ✔️ | suite without auto-restore | 845ms |
e2e/tests/jsonReporter.test.ts ✔️
JSON Reporter
| Result | Test | Time |
|---|---|---|
| ✔️ | writes test result to sum.result.json | 721ms |
| ✔️ | outputs coverage report | 698ms |
e2e/tests/autoResetMocks.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | suite with auto-reset | 801ms |
| ✔️ | suite without auto-reset | 827ms |
e2e/tests/focusedTests.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | runs only "it.only" tests | 834ms |
e2e/tests/watchModeOnlyFailed.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | can press "f" to run only failed tests | 1341ms |
e2e/tests/beforeEachQueue.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not work on jest-circus | 1ms |
Correct beforeEach order
| Result | Test | Time |
|---|---|---|
| ✖️ | ensures the correct order for beforeEach | 0ms |
e2e/tests/extraGlobals.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with injected globals | 962ms |
e2e/tests/snapshotSerializers.test.ts ✔️
Snapshot serializers
| Result | Test | Time |
|---|---|---|
| ✔️ | renders snapshot | 607ms |
| ✔️ | compares snapshots correctly | 1365ms |
e2e/tests/locationInResults.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | defaults to null for location | 836ms |
| ✔️ | adds correct location info when provided with flag | 859ms |
e2e/tests/consoleLogOutputWhenRunInBand.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints console.logs when run with forceExit | 726ms |
e2e/tests/dependencyClash.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does not require project modules from inside node_modules | 723ms |
e2e/tests/coverageWithoutTransform.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | produces code coverage for uncovered files without transformer | 1020.9999999999999ms |
e2e/tests/cliHandlesExactFilenames.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | CLI accepts exact file names if matchers matched | 741ms |
| ✔️ | CLI skips exact file names if no matchers matched | 389ms |
e2e/tests/requireMainAfterCreateRequire.test.ts ✔️
on node >=12.2.0
| Result | Test | Time |
|---|---|---|
| ✔️ | require.main not undefined after createRequire |
891ms |
e2e/tests/resetModules.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | jest.resetModules should not error when _isMockFunction is defined but not boolean | 883ms |
e2e/tests/watchModeUpdateSnapshot.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | can press "u" to update snapshots | 993ms |
e2e/tests/generatorMock.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | mock works with generator | 974ms |
e2e/tests/resolveGetPaths.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | require.resolve.paths | 1119ms |
e2e/tests/v8Coverage.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints coverage with missing sourcemaps | 1002.9999999999999ms |
| ✔️ | prints coverage with empty sourcemaps | 1338ms |
e2e/tests/resolveWithPaths.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | require.resolve with paths | 1117ms |
e2e/tests/logHeapUsage.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | logs memory usage | 830ms |
e2e/tests/requireMain.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | provides require.main set to test suite module |
1008.9999999999999ms |
e2e/tests/snapshotMockFs.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | store snapshot even if fs is mocked | 800ms |
e2e/tests/snapshot-unknown.test.ts ✔️
Snapshot serializers
| Result | Test | Time |
|---|---|---|
| ✔️ | renders snapshot | 798ms |
examples/angular/app.component.spec.ts ✔️
AppComponent
| Result | Test | Time |
|---|---|---|
| ✔️ | should create the app | 69ms |
| ✔️ | should have as title 'angular' | 28ms |
| ✔️ | should render title in a h1 tag | 115ms |
e2e/tests/stackTraceNoCaptureStackTrace.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints a usable stack trace even if no Error.captureStackTrace | 848ms |
e2e/tests/testNamePatternSkipped.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | testNamePattern skipped | 924ms |
e2e/tests/failureDetailsProperty.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | that the failureDetails property is set | 856ms |
e2e/tests/snapshotResolver.test.ts ✔️
Custom snapshot resolver
| Result | Test | Time |
|---|---|---|
| ✔️ | Resolves snapshot files using custom resolver | 735ms |
e2e/tests/processExit.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints stack trace pointing to process.exit call | 1012.9999999999999ms |
e2e/tests/nodePath.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | supports NODE_PATH | 833ms |
e2e/tests/verbose.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | Verbose Reporter | 631ms |
e2e/tests/listTests.test.ts ✔️
--listTests flag
| Result | Test | Time |
|---|---|---|
| ✔️ | causes tests to be printed in different lines | 478ms |
| ✔️ | causes tests to be printed out as JSON when using the --json flag | 404ms |
e2e/tests/createProcessObject.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | allows retrieving the current domain | 867ms |
examples/react-testing-library/tests/CheckboxWithLabel-test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | CheckboxWithLabel changes the text after click | 33ms |
examples/angular/shared/data.service.spec.ts ✔️
Service: DataService
| Result | Test | Time |
|---|---|---|
| ✔️ | should create service | 20ms |
| ✔️ | should return the right title | 8ms |
e2e/tests/environmentAfterTeardown.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | prints useful error for environment methods after test is done | 846ms |
e2e/tests/esmConfigFile.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | reads config from cjs file | 157ms |
on node ^12.17.0 || >=13.2.0
| Result | Test | Time |
|---|---|---|
| ✔️ | reads config from mjs file | 202ms |
| ✔️ | reads config from js file when package.json#type=module | 115ms |
examples/enzyme/tests/CheckboxWithLabel-test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | CheckboxWithLabel changes the text after click | 6ms |
examples/module-mock/tests/mock_per_test.js ✔️
define mock per test
| Result | Test | Time |
|---|---|---|
| ✔️ | uses mocked module | 2ms |
| ✔️ | uses actual module | 10ms |
examples/mongodb/test/db.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | should aggregate docs from collection | 10ms |
examples/snapshot/tests/link.react.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | renders correctly | 6ms |
| ✔️ | renders as an anchor when no page is set | 1ms |
| ✔️ | properly escapes quotes | 1ms |
| ✔️ | changes the class when hovered | 2ms |
examples/typescript/tests/CheckboxWithLabel-test.tsx ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | CheckboxWithLabel changes the text after click | 16ms |
examples/react/tests/CheckboxWithLabel-test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | CheckboxWithLabel changes the text after click | 17ms |
e2e/tests/showConfig.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | --showConfig outputs config info and exits | 144ms |
examples/snapshot/tests/clock.react.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | renders correctly | 2ms |
examples/timer/tests/infinite_timer_game.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | schedules a 10-second timer after 1 second | 26ms |
examples/jquery/tests/fetch_current_user.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | calls into $.ajax with the correct params | 73ms |
| ✔️ | calls the callback when $.ajax requests are finished | 10ms |
examples/jquery/tests/display_user.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | displays a user after a click | 71ms |
examples/timer/tests/timer_game.test.js ✔️
timerGame
| Result | Test | Time |
|---|---|---|
| ✔️ | waits 1 second before ending the game | 8ms |
| ✔️ | calls the callback after 1 second via runAllTimers | 2ms |
| ✔️ | calls the callback after 1 second via advanceTimersByTime | 1ms |
examples/async/tests/user.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | works with resolves | 1ms |
| ✔️ | works with promises | 0ms |
| ✔️ | works with async/await | 0ms |
| ✔️ | works with async/await and resolves | 1ms |
| ✔️ | tests error with rejects | 0ms |
| ✔️ | tests error with promises | 0ms |
| ✔️ | tests error with async/await | 1ms |
| ✔️ | tests error with async/await and rejects | 0ms |
examples/automatic-mocks/tests/createMockFromModule.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | implementation created by automock | 1ms |
| ✔️ | implementation created by jest.createMockFromModule | 0ms |
examples/manual-mocks/tests/file_summarizer.test.js ✔️
listFilesInDirectorySync
| Result | Test | Time |
|---|---|---|
| ✔️ | includes all files in the directory in the summary | 21ms |
examples/typescript/tests/calc.test.ts ✔️
calc - mocks
| Result | Test | Time |
|---|---|---|
| ✔️ | returns result from subtract | 1ms |
| ✔️ | returns result from sum | 1ms |
| ✔️ | adds last result to memory | 0ms |
| ✔️ | subtracts last result to memory | 1ms |
| ✔️ | clears the memory | 1ms |
| ✔️ | throws an error when invalid Op is passed | 8ms |
examples/getting-started/sum.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | adds 1 + 2 to equal 3 | 0ms |
examples/angular/shared/sub.service.spec.ts ✔️
Service: SubService
| Result | Test | Time |
|---|---|---|
| ✔️ | should create service | 12ms |
examples/manual-mocks/tests/user.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | if orginal user model | 1ms |
examples/typescript/tests/sum-test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | adds 1 + 2 to equal 3 in TScript | 8ms |
| ✔️ | adds 1 + 2 to equal 3 in JavaScript | 9ms |
examples/automatic-mocks/tests/automock.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | if utils are mocked | 0ms |
| ✔️ | mocked implementation | 1ms |
examples/manual-mocks/tests/lodashMocking.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | if lodash head is mocked | 1ms |
examples/manual-mocks/tests/userMocked.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | if user model is mocked | 1ms |
examples/typescript/tests/sum.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | adds 1 + 2 to equal 3 in Typescript | 2ms |
| ✔️ | adds 1 + 2 to equal 3 in JavaScript | 1ms |
e2e/custom-test-sequencer/b.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | b | 0ms |
examples/typescript/tests/sub-test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | subtracts 5 - 1 to equal 4 in TypeScript | 1ms |
examples/module-mock/tests/full_mock.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does a full mock | 0ms |
e2e/tests/global.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | globals are properly defined | 0ms |
examples/automatic-mocks/tests/disableAutomocking.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | original implementation | 0ms |
e2e/timer-reset-mocks/after-reset-all-mocks/timerAndMock.test.js ✔️
timers
| Result | Test | Time |
|---|---|---|
| ✔️ | should work before calling resetAllMocks | 1ms |
| ✔️ | should not break after calling resetAllMocks | 1ms |
e2e/tests/requireV8Module.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | v8 module | 1ms |
e2e/timer-reset-mocks/with-reset-mocks/timerWithMock.test.js ✔️
timers
| Result | Test | Time |
|---|---|---|
| ✔️ | should work before calling resetAllMocks | 0ms |
examples/module-mock/tests/partial_mock.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | does a partial mock | 1ms |
e2e/custom-test-sequencer/d.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | d | 0ms |
e2e/custom-test-sequencer/a.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | a | 0ms |
e2e/custom-test-sequencer/e.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | e | 0ms |
e2e/custom-test-sequencer/c.test.js ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | c | 0ms |
e2e/tests/asyncAndCallback.test.ts ✔️
| Result | Test | Time |
|---|---|---|
| ✔️ | errors when a test both returns a promise and takes a callback | 704ms |