Skip to content

Commit

Permalink
Improve the english on visual difference message (#5868)
Browse files Browse the repository at this point in the history
  • Loading branch information
orta authored and rickhanlonii committed Mar 26, 2018
1 parent 1a487c1 commit fbbfd52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Received: <red>[]</>

Difference:

<dim>Compared values have no visual difference.</> <dim>Looks like you wanted to test for object/array equality with strict \`toBe\` matcher. You probably need to use \`toEqual\` instead.</>"
<dim>Compared values have no visual difference.</> <dim>Looks like you wanted to test for object/array equality with the stricter \`toBe\` matcher. You probably need to use \`toEqual\` instead.</>"
`;

exports[`.toBe() fails for: {"a": 1} and {"a": 1} 1`] = `
Expand All @@ -301,7 +301,7 @@ Received: <red>{\\"a\\": 1}</>

Difference:

<dim>Compared values have no visual difference.</> <dim>Looks like you wanted to test for object/array equality with strict \`toBe\` matcher. You probably need to use \`toEqual\` instead.</>"
<dim>Compared values have no visual difference.</> <dim>Looks like you wanted to test for object/array equality with the stricter \`toBe\` matcher. You probably need to use \`toEqual\` instead.</>"
`;

exports[`.toBe() fails for: {"a": 1} and {"a": 5} 1`] = `
Expand Down Expand Up @@ -329,7 +329,7 @@ Received: <red>{}</>

Difference:

<dim>Compared values have no visual difference.</> <dim>Looks like you wanted to test for object/array equality with strict \`toBe\` matcher. You probably need to use \`toEqual\` instead.</>"
<dim>Compared values have no visual difference.</> <dim>Looks like you wanted to test for object/array equality with the stricter \`toBe\` matcher. You probably need to use \`toEqual\` instead.</>"
`;

exports[`.toBe() fails for: -0 and 0 1`] = `
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-matcher-utils/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const NUMBERS = [
];

export const SUGGEST_TO_EQUAL = chalk.dim(
'Looks like you wanted to test for object/array equality with strict `toBe` matcher. You probably need to use `toEqual` instead.',
'Looks like you wanted to test for object/array equality with the stricter `toBe` matcher. You probably need to use `toEqual` instead.',
);

export const stringify = (object: any, maxDepth?: number = 10): string => {
Expand Down

0 comments on commit fbbfd52

Please sign in to comment.