Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to fail if no tests are found #3672

Merged
merged 2 commits into from
Oct 8, 2017

Conversation

EnoahNetzach
Copy link
Contributor

Summary

By adding a --failWithNoTests the intent is to catch when no files are detected (for example used together with --testPathPattern), so that CI can detect this and fail.

This happened in Create React App for a while, and was virtually impossible to detect.

Test plan

I begun with adding a test case, verifying that it fails, then I'll add the feature.

if (argv.failWithNoTests) {
new Console(pipe, pipe).error(noTestsFoundMessage);

process.exit(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the way it should be done.
Is it right?

@EnoahNetzach
Copy link
Contributor Author

CIs failed on the first commit (tests only) as expected travis & appveyor (circleci was canceled.)

@codecov-io
Copy link

codecov-io commented May 27, 2017

Codecov Report

Merging #3672 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3672      +/-   ##
==========================================
- Coverage   56.17%   56.14%   -0.04%     
==========================================
  Files         191      191              
  Lines        6424     6428       +4     
  Branches        6        6              
==========================================
  Hits         3609     3609              
- Misses       2812     2816       +4     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-config/src/index.js 0% <ø> (ø) ⬆️
packages/jest-cli/src/run_jest.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfdca8b...99baa11. Read the comment docs.

@EnoahNetzach EnoahNetzach changed the title Ad an option to fail if no tests are found Add an option to fail if no tests are found May 27, 2017
@cpojer
Copy link
Member

cpojer commented May 30, 2017

I would prefer to make this the default, but have a way to opt-out of the feature. The reason we need this not to fail at FB is because our internal test runner currently sees more tests than Jest sees, so it would invoke Jest on files that aren't actual tests. Do you mind inverting this and making the default throw?

@cpojer
Copy link
Member

cpojer commented Aug 24, 2017

Would you mind rebasing this PR?

@cpojer cpojer mentioned this pull request Aug 24, 2017
6 tasks
@EnoahNetzach
Copy link
Contributor Author

I'm rebasing right now, but I see a lot (37) of snapshot tests failing even if I stash my changes (after commit dfdca8b).

Shell output for yarn run jest --silent -- --no-cache:

Summary of all failing tests
FAIL packages/jest-util/src/tests/validate_cli_options.test.js
● fails for unknown option

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Unrecognized CLI Parameter:</>
-<red></>
-<red>  Unrecognized option <bold>"unknown".</>
-<red></>
-<red>  <bold>CLI Options Documentation:</>
-<red>  http://facebook.github.io/jest/docs/cli.html</>
-<red></>"
+"<red><bold><bold>●<bold> Unrecognized CLI Parameter:
+
+  Unrecognized option <bold>"unknown".
+
+  <bold>CLI Options Documentation:
+  http://facebook.github.io/jest/docs/cli.html
+</>"
  
  at Object.<anonymous>.test (packages/jest-util/src/__tests__/validate_cli_options.test.js:33:3)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● fails for multiple unknown options

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Unrecognized CLI Parameters:</>
-<red></>
-<red>  Following options were not recognized:</>
-<red>  <bold>["jest", "test"]</>
-<red></>
-<red>  <bold>CLI Options Documentation:</>
-<red>  http://facebook.github.io/jest/docs/cli.html</>
-<red></>"
+"<red><bold><bold>●<bold> Unrecognized CLI Parameters:
+
+  Following options were not recognized:
+  <bold>["jest", "test"]
+
+  <bold>CLI Options Documentation:
+  http://facebook.github.io/jest/docs/cli.html
+</>"
  
  at Object.<anonymous>.test (packages/jest-util/src/__tests__/validate_cli_options.test.js:45:3)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

FAIL packages/jest-diff/src/tests/diff.test.js
● falls back to not call toJSON if objects look identical

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

@@ -1,7 +1,7 @@
 "<dim>Compared values serialize to the same structure.
-<dim>Printing internal object structure without calling `toJSON` instead.
+Printing internal object structure without calling `toJSON` instead.
 
 <green>- Expected</>
 <red>+ Received</>
 
 <dim>  <dim>Object {
  
  at Object.<anonymous>.test (packages/jest-diff/src/__tests__/diff.test.js:94:22)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● collapses big diffs to patch format

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

@@ -1,9 +1,9 @@
 "<green>- Expected</>
 <red>+ Received</>
 
-@@ -6,9 +6,9 @@</>
+@@ -6,9 +6,9 @@
 </><dim>     4,
 <dim>     5,
 <dim>     6,
 <dim>     7,
 <dim>     8,
  
  at Object.<anonymous>.test (packages/jest-diff/src/__tests__/diff.test.js:168:18)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● context › number of lines: null (5 default)

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

@@ -1,9 +1,9 @@
 "<green>- Expected</>
 <red>+ Received</>
 
-@@ -6,9 +6,9 @@</>
+@@ -6,9 +6,9 @@
 </><dim>     4,
 <dim>     5,
 <dim>     6,
 <dim>     7,
 <dim>     8,
  
  at Object.test (packages/jest-diff/src/__tests__/diff.test.js:186:22)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● context › number of lines: 2

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

@@ -1,9 +1,9 @@
 "<green>- Expected</>
 <red>+ Received</>
 
-@@ -9,6 +9,6 @@</>
+@@ -9,6 +9,6 @@
 </><dim>     7,
 <dim>     8,
 <red>+    10,</>
 <dim>     9,
 <green>-    10,</>
  
  at Object.test (packages/jest-diff/src/__tests__/diff.test.js:186:22)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● context › number of lines: 1

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<green>- Expected</>
 <red>+ Received</>
 
-@@ -10,4 +10,4 @@</>
+@@ -10,4 +10,4 @@
 </><dim>     8,
 <red>+    10,</>
 <dim>     9,
 <green>-    10,</>
 <dim>   ],"
  
  at Object.test (packages/jest-diff/src/__tests__/diff.test.js:186:22)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● context › number of lines: 0

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<green>- Expected</>
 <red>+ Received</>
 
-@@ -11,0 +11,1 @@</>
+@@ -11,0 +11,1 @@
 </><red>+    10,</>
-@@ -12,1 +13,0 @@</>
+@@ -12,1 +13,0 @@
 </><green>-    10,</>"
  
  at Object.test (packages/jest-diff/src/__tests__/diff.test.js:186:22)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● context › number of lines: -1 (5 default)

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

@@ -1,9 +1,9 @@
 "<green>- Expected</>
 <red>+ Received</>
 
-@@ -6,9 +6,9 @@</>
+@@ -6,9 +6,9 @@
 </><dim>     4,
 <dim>     5,
 <dim>     6,
 <dim>     7,
 <dim>     8,
  
  at Object.test (packages/jest-diff/src/__tests__/diff.test.js:186:22)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

FAIL packages/jest-message-util/src/tests/messages.test.js
● should exclude jasmine from stack trace for Unix paths.

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<bold><red>  <bold>● <bold>Unix test</>
 
       at stack (../jest-jasmine2/build/jasmine-2.4.1.js:1580:17)
 <dim>      
-<dim>      <dim>at Object.addResult (<dim>../jest-jasmine2/build/jasmine-2.4.1.js<dim>:1550:14)<dim>
-<dim>      <dim>at Object.it (<dim>build/__tests__/messages-test.js<dim>:45:41)<dim>
+      <dim>at Object.addResult (<dim>../jest-jasmine2/build/jasmine-2.4.1.js<dim>:1550:14)<dim>
+      <dim>at Object.it (<dim>build/__tests__/messages-test.js<dim>:45:41)<dim>
 "
  
  at Object.<anonymous>.it (packages/jest-message-util/src/__tests__/messages.test.js:44:20)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

FAIL packages/jest-validate/src/tests/validate.test.js
● pretty prints valid config for Boolean

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Validation Error:</>
-<red></>
-<red>  Option <bold>"automock" must be of type:</>
-<red>    <bold><green>boolean<red></>
-<red>  but instead received:</>
-<red>    <bold><red>array<red></>
-<red></>
-<red>  Example:</>
-<red>  {</>
-<red>    <bold>"automock": <bold>false</>
-<red>  }</>
-<red></>"
+"<red><bold><bold>●<bold> Validation Error:
+
+  Option <bold>"automock" must be of type:
+    <bold><green>boolean<red>
+  but instead received:
+    <bold><red>array<red>
+
+  Example:
+  {
+    <bold>"automock": <bold>false
+  }
+</>"
  
  at Object.test (packages/jest-validate/src/__tests__/validate.test.js:54:5)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● pretty prints valid config for Array

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Validation Error:</>
-<red></>
-<red>  Option <bold>"coverageReporters" must be of type:</>
-<red>    <bold><green>array<red></>
-<red>  but instead received:</>
-<red>    <bold><red>object<red></>
-<red></>
-<red>  Example:</>
-<red>  {</>
-<red>    <bold>"coverageReporters": <bold>["json", "text", "lcov", "clover"]</>
-<red>  }</>
-<red></>"
+"<red><bold><bold>●<bold> Validation Error:
+
+  Option <bold>"coverageReporters" must be of type:
+    <bold><green>array<red>
+  but instead received:
+    <bold><red>object<red>
+
+  Example:
+  {
+    <bold>"coverageReporters": <bold>["json", "text", "lcov", "clover"]
+  }
+</>"
  
  at Object.test (packages/jest-validate/src/__tests__/validate.test.js:54:5)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● pretty prints valid config for String

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Validation Error:</>
-<red></>
-<red>  Option <bold>"preset" must be of type:</>
-<red>    <bold><green>string<red></>
-<red>  but instead received:</>
-<red>    <bold><red>number<red></>
-<red></>
-<red>  Example:</>
-<red>  {</>
-<red>    <bold>"preset": <bold>"react-native"</>
-<red>  }</>
-<red></>"
+"<red><bold><bold>●<bold> Validation Error:
+
+  Option <bold>"preset" must be of type:
+    <bold><green>string<red>
+  but instead received:
+    <bold><red>number<red>
+
+  Example:
+  {
+    <bold>"preset": <bold>"react-native"
+  }
+</>"
  
  at Object.test (packages/jest-validate/src/__tests__/validate.test.js:54:5)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● pretty prints valid config for Object

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Validation Error:</>
-<red></>
-<red>  Option <bold>"haste" must be of type:</>
-<red>    <bold><green>object<red></>
-<red>  but instead received:</>
-<red>    <bold><red>number<red></>
-<red></>
-<red>  Example:</>
-<red>  {</>
-<red>    <bold>"haste": <bold>{"providesModuleNodeModules": ["react", "react-native"]}</>
-<red>  }</>
-<red></>"
+"<red><bold><bold>●<bold> Validation Error:
+
+  Option <bold>"haste" must be of type:
+    <bold><green>object<red>
+  but instead received:
+    <bold><red>number<red>
+
+  Example:
+  {
+    <bold>"haste": <bold>{"providesModuleNodeModules": ["react", "react-native"]}
+  }
+</>"
  
  at Object.test (packages/jest-validate/src/__tests__/validate.test.js:54:5)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● pretty prints valid config for Function

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>●<bold> Validation Error:</>
-<red></>
-<red>  Option <bold>"fn" must be of type:</>
-<red>    <bold><green>function<red></>
-<red>  but instead received:</>
-<red>    <bold><red>string<red></>
-<red></>
-<red>  Example:</>
-<red>  {</>
-<red>    <bold>"fn": <bold>(config, option, deprecatedOptions) => true</>
-<red>  }</>
-<red></>"
+"<red><bold><bold>●<bold> Validation Error:
+
+  Option <bold>"fn" must be of type:
+    <bold><green>function<red>
+  but instead received:
+    <bold><red>string<red>
+
+  Example:
+  {
+    <bold>"fn": <bold>(config, option, deprecatedOptions) => true
+  }
+</>"
  
  at Object.<anonymous>.test (packages/jest-validate/src/__tests__/validate.test.js:65:3)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● displays warning for unknown config options

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<bold><bold>●<bold> Validation Warning:</>
-</>
-  Unknown option <bold>"unkwon" with value <bold>{} was found. Did you mean <bold>"unknown"?</>
-  This is probably a typing mistake. Fixing it will remove this message.</>
+"<bold><bold>●<bold> Validation Warning:
+
+  Unknown option <bold>"unkwon" with value <bold>{} was found. Did you mean <bold>"unknown"?
+  This is probably a typing mistake. Fixing it will remove this message.
 </>"
  
  at Object.<anonymous>.test (packages/jest-validate/src/__tests__/validate.test.js:87:41)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● displays warning for deprecated config options

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<bold><bold>●<bold> Deprecation Warning:</>
-</>
-  Option <bold>scriptPreprocessor was replaced by <bold>transform, which support multiple preprocessors.</>
-</>
-  Jest now treats your current configuration as:</>
-  {</>
-    <bold>"transform": <bold>{".*": "test"}</>
-  }</>
-</>
-  Please update your configuration.</>
+"<bold><bold>●<bold> Deprecation Warning:
+
+  Option <bold>scriptPreprocessor was replaced by <bold>transform, which support multiple preprocessors.
+
+  Jest now treats your current configuration as:
+  {
+    <bold>"transform": <bold>{".*": "test"}
+  }
+
+  Please update your configuration.
 </>"
  
  at Object.<anonymous>.test (packages/jest-validate/src/__tests__/validate.test.js:106:41)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● works with custom warnings

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<bold>My Custom Warning:</>
-</>
-  Unknown option <bold>"unknown" with value <bold>"string" was found.</>
-  This is probably a typing mistake. Fixing it will remove this message.</>
-</>
+"<bold>My Custom Warning:
+
+  Unknown option <bold>"unknown" with value <bold>"string" was found.
+  This is probably a typing mistake. Fixing it will remove this message.
+
 My custom comment</>"
  
  at Object.<anonymous>.test (packages/jest-validate/src/__tests__/validate.test.js:126:41)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● works with custom errors

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold>My Custom Error:</>
-<red></>
-<red>  Option <bold>"test" must be of type:</>
-<red>    <bold><green>array<red></>
-<red>  but instead received:</>
-<red>    <bold><red>string<red></>
-<red></>
-<red>  Example:</>
-<red>  {</>
-<red>    <bold>"test": <bold>[1, 2]</>
-<red>  }</>
-<red></>
-<red>My custom comment</>"
+"<red><bold>My Custom Error:
+
+  Option <bold>"test" must be of type:
+    <bold><green>array<red>
+  but instead received:
+    <bold><red>string<red>
+
+  Example:
+  {
+    <bold>"test": <bold>[1, 2]
+  }
+
+My custom comment</>"
  
  at Object.<anonymous>.test (packages/jest-validate/src/__tests__/validate.test.js:142:43)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● works with custom deprecations

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<bold>My Custom Deprecation Warning:</>
-</>
-  Option <bold>scriptPreprocessor was replaced by <bold>transform, which support multiple preprocessors.</>
-</>
-  Jest now treats your current configuration as:</>
-  {</>
-    <bold>"transform": <bold>{".*": "test"}</>
-  }</>
-</>
-  Please update your configuration.</>
-</>
+"<bold>My Custom Deprecation Warning:
+
+  Option <bold>scriptPreprocessor was replaced by <bold>transform, which support multiple preprocessors.
+
+  Jest now treats your current configuration as:
+  {
+    <bold>"transform": <bold>{".*": "test"}
+  }
+
+  Please update your configuration.
+
 My custom comment</>"
  
  at Object.<anonymous>.test (packages/jest-validate/src/__tests__/validate.test.js:160:41)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

FAIL packages/expect/src/tests/to_throw_matchers.test.js
● .toThrowError() › strings › threw, but message did not match

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).toThrowError(<green>string</><dim>)
 
 Expected the function to throw an error matching:
   <green>"banana"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:60:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrowError() › strings › threw, but should not have

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).not.toThrowError(<green>string</><dim>)
 
 Expected the function not to throw an error matching:
   <green>"apple"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:74:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrowError() › regexp › threw, but message did not match

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).toThrowError(<green>regexp</><dim>)
 
 Expected the function to throw an error matching:
   <green>/banana/</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:100:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrowError() › regexp › threw, but should not have

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).not.toThrowError(<green>regexp</><dim>)
 
 Expected the function not to throw an error matching:
   <green>/apple/</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:108:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrowError() › error class › threw, but class did not match

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).toThrowError(<green>type</><dim>)
 
 Expected the function to throw an error of type:
   <green>"Err2"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:137:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrowError() › error class › threw, but should not have

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).not.toThrowError(<green>type</><dim>)
 
 Expected the function not to throw an error of type:
   <green>"Err"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:145:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrow() › strings › threw, but message did not match

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).toThrow(<green>string</><dim>)
 
 Expected the function to throw an error matching:
   <green>"banana"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:60:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrow() › strings › threw, but should not have

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).not.toThrow(<green>string</><dim>)
 
 Expected the function not to throw an error matching:
   <green>"apple"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:74:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrow() › regexp › threw, but message did not match

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).toThrow(<green>regexp</><dim>)
 
 Expected the function to throw an error matching:
   <green>/banana/</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:100:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrow() › regexp › threw, but should not have

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).not.toThrow(<green>regexp</><dim>)
 
 Expected the function not to throw an error matching:
   <green>/apple/</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:108:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrow() › error class › threw, but class did not match

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).toThrow(<green>type</><dim>)
 
 Expected the function to throw an error of type:
   <green>"Err2"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:137:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● .toThrow() › error class › threw, but should not have

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

 "<dim>expect(<red>function</><dim>).not.toThrow(<green>type</><dim>)
 
 Expected the function not to throw an error of type:
   <green>"Err"</>
 Instead, it threw:
-<red>  Error      </>
-<red>      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
+<red>  Error      
+      <dim>at jestExpect (packages/expect/src/__tests__/toThrowMatchers-test.js<dim>:24:74)</>"
  
  at Object.test (packages/expect/src/__tests__/to_throw_matchers.test.js:145:12)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

FAIL packages/jest-config/src/tests/normalize.test.js
● rootDir › throws if the options is missing a rootDir property

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>● <bold>Validation Error:</>
-<red></>
-<red>  Configuration option <bold>rootDir must be specified.</>
-<red></>
-<red>  <bold>Configuration Documentation:</>
-<red>  https://facebook.github.io/jest/docs/configuration.html</>
-<red></>"
+"<red><bold><bold>● <bold>Validation Error:
+
+  Configuration option <bold>rootDir must be specified.
+
+  <bold>Configuration Documentation:
+  https://facebook.github.io/jest/docs/configuration.html
+</>"
  
  at Object.it (packages/jest-config/src/__tests__/normalize.test.js:101:8)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● testEnvironment › throws on invalid environment names

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>● <bold>Validation Error:</>
-<red></>
-<red>  Test environment <bold>phantom cannot be found. Make sure the <bold>testEnvironment configuration option points to an existing node module.</>
-<red></>
-<red>  <bold>Configuration Documentation:</>
-<red>  https://facebook.github.io/jest/docs/configuration.html</>
-<red></>"
+"<red><bold><bold>● <bold>Validation Error:
+
+  Test environment <bold>phantom cannot be found. Make sure the <bold>testEnvironment configuration option points to an existing node module.
+
+  <bold>Configuration Documentation:
+  https://facebook.github.io/jest/docs/configuration.html
+</>"
  
  at Object.it (packages/jest-config/src/__tests__/normalize.test.js:618:5)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● Upgrade help › logs a warning when scriptPreprocessor and/or preprocessorIgnorePatterns are used

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<bold><bold>●<bold> Deprecation Warning:</>
-</>
-  Option <bold>"preprocessorIgnorePatterns" was replaced by <bold>"transformIgnorePatterns", which support multiple preprocessors.</>
-</>
-  Jest now treats your current configuration as:</>
-  {</>
-    <bold>"transformIgnorePatterns": <bold>["bar/baz", "qux/quux"]</>
-  }</>
-</>
-  Please update your configuration.</>
-</>
-  <bold>Configuration Documentation:</>
-  https://facebook.github.io/jest/docs/configuration.html</>
+"<bold><bold>●<bold> Deprecation Warning:
+
+  Option <bold>"preprocessorIgnorePatterns" was replaced by <bold>"transformIgnorePatterns", which support multiple preprocessors.
+
+  Jest now treats your current configuration as:
+  {
+    <bold>"transformIgnorePatterns": <bold>["bar/baz", "qux/quux"]
+  }
+
+  Please update your configuration.
+
+  <bold>Configuration Documentation:
+  https://facebook.github.io/jest/docs/configuration.html
 </>"
  
  at Object.it (packages/jest-config/src/__tests__/normalize.test.js:756:43)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● testMatch › throws if testRegex and testMatch are both specified

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>● <bold>Validation Error:</>
-<red></>
-<red>  Configuration options <bold>testMatch and <bold>testRegex cannot be used together.</>
-<red></>
-<red>  <bold>Configuration Documentation:</>
-<red>  https://facebook.github.io/jest/docs/configuration.html</>
-<red></>"
+"<red><bold><bold>● <bold>Validation Error:
+
+  Configuration options <bold>testMatch and <bold>testRegex cannot be used together.
+
+  <bold>Configuration Documentation:
+  https://facebook.github.io/jest/docs/configuration.html
+</>"
  
  at Object.it (packages/jest-config/src/__tests__/normalize.test.js:795:8)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

● preset › throws when preset not found

expect(value).toMatchSnapshot()

Received value does not match stored snapshot 1.

- Snapshot
+ Received

-"<red><bold><bold>● <bold>Validation Error:</>
-<red></>
-<red>  Preset <bold>doesnt-exist not found.</>
-<red></>
-<red>  <bold>Configuration Documentation:</>
-<red>  https://facebook.github.io/jest/docs/configuration.html</>
-<red></>"
+"<red><bold><bold>● <bold>Validation Error:
+
+  Preset <bold>doesnt-exist not found.
+
+  <bold>Configuration Documentation:
+  https://facebook.github.io/jest/docs/configuration.html
+</>"
  
  at Object.test (packages/jest-config/src/__tests__/normalize.test.js:867:8)
      at Promise (<anonymous>)
      at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:169:7)

@SimenB
Copy link
Member

SimenB commented Oct 8, 2017

Ci looks happy, anything holding this up?

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants