From 1df1f548dbd02f6d6bda0bc7d8fc29eca3605fd1 Mon Sep 17 00:00:00 2001 From: Tunde Thomas <4913483+tundethomas@users.noreply.github.com> Date: Wed, 20 May 2020 19:39:24 -0400 Subject: [PATCH 1/2] docs: fix jest-diff example --- docs/JestPlatform.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/JestPlatform.md b/docs/JestPlatform.md index 47b7140a732e..8459a3451a03 100644 --- a/docs/JestPlatform.md +++ b/docs/JestPlatform.md @@ -32,12 +32,12 @@ Tool for visualizing changes in data. Exports a function that compares two value ### Example ```javascript -const diff = require('jest-diff'); +const diffDefault = require('jest-diff').default; const a = {a: {b: {c: 5}}}; const b = {a: {b: {c: 6}}}; -const result = diff(a, b); +const result = diffDefault(a, b); // print diff console.log(result); @@ -58,7 +58,7 @@ const code = ` * * @flow */ - + console.log('Hello World!'); `; From 938834dd068a8211927880f835e6ce6e873e1563 Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Thu, 21 May 2020 14:09:42 +0200 Subject: [PATCH 2/2] Update JestPlatform.md --- docs/JestPlatform.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/JestPlatform.md b/docs/JestPlatform.md index 8459a3451a03..648acb758943 100644 --- a/docs/JestPlatform.md +++ b/docs/JestPlatform.md @@ -32,12 +32,12 @@ Tool for visualizing changes in data. Exports a function that compares two value ### Example ```javascript -const diffDefault = require('jest-diff').default; +const diff = require('jest-diff').default; const a = {a: {b: {c: 5}}}; const b = {a: {b: {c: 6}}}; -const result = diffDefault(a, b); +const result = diff(a, b); // print diff console.log(result);