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

Update to Jest 23 #4539

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"eslint-plugin-import": "2.9.0",
"eslint-plugin-prettier": "2.6.0",
"eslint-plugin-react": "7.7.0",
"jest": "21.1.0",
"jest": "23.0.0",
"mkdirp": "0.5.1",
"prettier": "1.12.1",
"prettylint": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`test.component.ts 1`] = `
exports[`test.component.ts - typescript-verify 1`] = `
@Component({
selector: 'app-test',
template: \`<ul> <li>test</li>
Expand Down Expand Up @@ -39,7 +39,7 @@ class TestComponent {}

`;

exports[`test.component.ts 2`] = `
exports[`test.component.ts - typescript-verify 2`] = `
@Component({
selector: 'app-test',
template: \`<ul> <li>test</li>
Expand Down
2 changes: 1 addition & 1 deletion tests/array_spread/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`multiple.js 1`] = `
exports[`multiple.js - flow-verify 1`] = `
[...a, ...b,];
[...a, ...b];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 3 additions & 3 deletions tests/arrays/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`empty.js 1`] = `
exports[`empty.js - flow-verify 1`] = `
const a = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || [];
const a = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -11,7 +11,7 @@ const a =

`;

exports[`last.js 1`] = `
exports[`last.js - flow-verify 1`] = `
[,];
[,,];
[,,1,];
Expand All @@ -24,7 +24,7 @@ exports[`last.js 1`] = `

`;

exports[`preserve_empty_lines.js 1`] = `
exports[`preserve_empty_lines.js - flow-verify 1`] = `
a = [

1,
Expand Down
6 changes: 3 additions & 3 deletions tests/arrow-call/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`arrow_call.js 1`] = `
exports[`arrow_call.js - flow-verify 1`] = `
const testResults = results.testResults.map(testResult =>
formatResult(testResult, formatter, reporter)
);
Expand Down Expand Up @@ -95,7 +95,7 @@ const composition = (ViewComponent, ContainerComponent) =>

`;

exports[`arrow_call.js 2`] = `
exports[`arrow_call.js - flow-verify 2`] = `
const testResults = results.testResults.map(testResult =>
formatResult(testResult, formatter, reporter)
);
Expand Down Expand Up @@ -190,7 +190,7 @@ const composition = (ViewComponent, ContainerComponent) =>

`;

exports[`arrow_call.js 3`] = `
exports[`arrow_call.js - flow-verify 3`] = `
const testResults = results.testResults.map(testResult =>
formatResult(testResult, formatter, reporter)
);
Expand Down
40 changes: 20 additions & 20 deletions tests/arrows/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`arrow_function_expression.js 1`] = `
exports[`arrow_function_expression.js - babylon-verify 1`] = `
(a => {}).length
typeof (() => {});
export default (() => {})();
Expand Down Expand Up @@ -76,7 +76,7 @@ a = b => {

`;

exports[`arrow_function_expression.js 2`] = `
exports[`arrow_function_expression.js - babylon-verify 2`] = `
(a => {}).length
typeof (() => {});
export default (() => {})();
Expand Down Expand Up @@ -152,21 +152,21 @@ a = (b) => {

`;

exports[`block_like.js 1`] = `
exports[`block_like.js - babylon-verify 1`] = `
a = () => ({} = this);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a = () => ({} = this);

`;

exports[`block_like.js 2`] = `
exports[`block_like.js - babylon-verify 2`] = `
a = () => ({} = this);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a = () => ({} = this);

`;

exports[`call.js 1`] = `
exports[`call.js - babylon-verify 1`] = `
Seq(typeDef.interface.groups).forEach(group =>
Seq(group.members).forEach((member, memberName) =>
markdownDoc(
Expand Down Expand Up @@ -339,7 +339,7 @@ fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next =>

`;

exports[`call.js 2`] = `
exports[`call.js - babylon-verify 2`] = `
Seq(typeDef.interface.groups).forEach(group =>
Seq(group.members).forEach((member, memberName) =>
markdownDoc(
Expand Down Expand Up @@ -512,7 +512,7 @@ fooooooooooooooooooooooooooooooooooooooooooooooooooo((action) => (next) =>

`;

exports[`comment.js 1`] = `
exports[`comment.js - babylon-verify 1`] = `
/**
* Curried function that ends with a BEM CSS Selector
*
Expand Down Expand Up @@ -577,7 +577,7 @@ export const bem = block =>

`;

exports[`comment.js 2`] = `
exports[`comment.js - babylon-verify 2`] = `
/**
* Curried function that ends with a BEM CSS Selector
*
Expand Down Expand Up @@ -642,7 +642,7 @@ export const bem = (block) =>

`;

exports[`currying.js 1`] = `
exports[`currying.js - babylon-verify 1`] = `
const fn = b => c => d => {
return 3;
};
Expand Down Expand Up @@ -681,7 +681,7 @@ const middleware = options => (req, res, next) => {

`;

exports[`currying.js 2`] = `
exports[`currying.js - babylon-verify 2`] = `
const fn = b => c => d => {
return 3;
};
Expand Down Expand Up @@ -720,7 +720,7 @@ const middleware = (options) => (req, res, next) => {

`;

exports[`long-call-no-args.js 1`] = `
exports[`long-call-no-args.js - babylon-verify 1`] = `
veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {})
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
veryLongCall(
Expand All @@ -730,7 +730,7 @@ veryLongCall(

`;

exports[`long-call-no-args.js 2`] = `
exports[`long-call-no-args.js - babylon-verify 2`] = `
veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {})
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
veryLongCall(
Expand All @@ -740,7 +740,7 @@ veryLongCall(

`;

exports[`long-contents.js 1`] = `
exports[`long-contents.js - babylon-verify 1`] = `
const foo = () => {
expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'});
};
Expand All @@ -756,7 +756,7 @@ const foo = () => {

`;

exports[`long-contents.js 2`] = `
exports[`long-contents.js - babylon-verify 2`] = `
const foo = () => {
expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'});
};
Expand All @@ -772,7 +772,7 @@ const foo = () => {

`;

exports[`parens.js 1`] = `
exports[`parens.js - babylon-verify 1`] = `
promise.then(
(result) => result,
(err) => err
Expand Down Expand Up @@ -812,7 +812,7 @@ foo(a => b, d);

`;

exports[`parens.js 2`] = `
exports[`parens.js - babylon-verify 2`] = `
promise.then(
(result) => result,
(err) => err
Expand Down Expand Up @@ -852,7 +852,7 @@ foo((a) => b, d);

`;

exports[`short_body.js 1`] = `
exports[`short_body.js - babylon-verify 1`] = `
const initializeSnapshotState = (
testFile: Path,
update: boolean,
Expand All @@ -869,7 +869,7 @@ const initializeSnapshotState = (

`;

exports[`short_body.js 2`] = `
exports[`short_body.js - babylon-verify 2`] = `
const initializeSnapshotState = (
testFile: Path,
update: boolean,
Expand All @@ -886,14 +886,14 @@ const initializeSnapshotState = (

`;

exports[`type_params.js 1`] = `
exports[`type_params.js - babylon-verify 1`] = `
<T>(a) => { }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<T>(a) => {};

`;

exports[`type_params.js 2`] = `
exports[`type_params.js - babylon-verify 2`] = `
<T>(a) => { }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<T>(a) => {};
Expand Down
2 changes: 1 addition & 1 deletion tests/arrows_bind/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`arrows-bind.js 1`] = `
exports[`arrows-bind.js - babylon-verify 1`] = `
a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
(a => b)::c;
a::(b => c);
Expand Down
4 changes: 2 additions & 2 deletions tests/assignment/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`binaryish.js 1`] = `
exports[`binaryish.js - flow-verify 1`] = `
const computedDescriptionLines = (showConfirm &&
descriptionLinesConfirming) ||
(focused && !loading && descriptionLinesFocused) ||
Expand All @@ -21,7 +21,7 @@ computedDescriptionLines =

`;

exports[`sequence.js 1`] = `
exports[`sequence.js - flow-verify 1`] = `
for ((i = 0), (len = arr.length); i < len; i++) {
console.log(arr[i])
}
Expand Down
2 changes: 1 addition & 1 deletion tests/assignment_comments/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`assignment_comments.js 1`] = `
exports[`assignment_comments.js - flow-verify 1`] = `
fnString =
// Comment
'some' + 'long' + 'string';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`assignment_expression.js 1`] = `
exports[`assignment_expression.js - flow-verify 1`] = `
this.size = this._origin = this._capacity = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this.size = this._origin = this._capacity = 0;
Expand Down
8 changes: 4 additions & 4 deletions tests/async/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`async-iteration.js 1`] = `
exports[`async-iteration.js - flow-verify 1`] = `

async function * a() {
yield* b();
Expand All @@ -24,7 +24,7 @@ class X {

`;

exports[`await_parse.js 1`] = `
exports[`await_parse.js - flow-verify 1`] = `
async function f() { (await f()).length }
async function g() {
invariant(
Expand Down Expand Up @@ -61,7 +61,7 @@ async () => {

`;

exports[`conditional-expression.js 1`] = `
exports[`conditional-expression.js - flow-verify 1`] = `
async function f() {
const result = typeof fn === 'function' ? await fn() : null;
}
Expand Down Expand Up @@ -92,7 +92,7 @@ async function f() {

`;

exports[`parens.js 1`] = `
exports[`parens.js - flow-verify 1`] = `
async function *f(){ await (yield x); }

async function f(){ await (() => {}); }
Expand Down