From fbbfd52004187fa68279d0015ece9d4001863e25 Mon Sep 17 00:00:00 2001 From: Orta Date: Sun, 25 Mar 2018 21:14:59 -0400 Subject: [PATCH] Improve the english on visual difference message (#5868) --- .../src/__tests__/__snapshots__/matchers.test.js.snap | 6 +++--- packages/jest-matcher-utils/src/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap b/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap index 1a759e202655..cc7fc3b606e9 100644 --- a/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap +++ b/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap @@ -290,7 +290,7 @@ Received: [] Difference: -Compared values have no visual difference. Looks like you wanted to test for object/array equality with strict \`toBe\` matcher. You probably need to use \`toEqual\` instead." +Compared values have no visual difference. 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`] = ` @@ -301,7 +301,7 @@ Received: {\\"a\\": 1} Difference: -Compared values have no visual difference. Looks like you wanted to test for object/array equality with strict \`toBe\` matcher. You probably need to use \`toEqual\` instead." +Compared values have no visual difference. 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`] = ` @@ -329,7 +329,7 @@ Received: {} Difference: -Compared values have no visual difference. Looks like you wanted to test for object/array equality with strict \`toBe\` matcher. You probably need to use \`toEqual\` instead." +Compared values have no visual difference. 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`] = ` diff --git a/packages/jest-matcher-utils/src/index.js b/packages/jest-matcher-utils/src/index.js index f5df6c90901c..557dd9cba5ca 100644 --- a/packages/jest-matcher-utils/src/index.js +++ b/packages/jest-matcher-utils/src/index.js @@ -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 => {