From 6c8fc73f2f747464e76e4a58e7d3daef3e216002 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Tue, 26 Jun 2018 10:57:17 -0700 Subject: [PATCH 1/2] chore(pgk): add update-snapshot script for all tests --- _SETUP.md | 6 ++++++ package.json | 1 + 2 files changed, 7 insertions(+) diff --git a/_SETUP.md b/_SETUP.md index 8c080252e5b..ebd501013be 100644 --- a/_SETUP.md +++ b/_SETUP.md @@ -51,6 +51,12 @@ or in watch mode yarn test:unit --watch ``` +### To update Jest snapshots use + +```bash +yarn test:update-snapshots +``` + ### To run code formatter (prettier) run ```bash diff --git a/package.json b/package.json index b333c6c4afe..cc59d3c3caa 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "scripts": { "setup": "node ./setup/setup.js", "test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest", + "test:update-snapshots": "yarn test -u", "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.test.js\"", "test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"", "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.unittest.js\"", From 17fa26c0adab297e3579199080fa8a56b14a5bcd Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 15:47:45 +0200 Subject: [PATCH 2/2] use jest directly --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc59d3c3caa..d89dedbf7b1 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "scripts": { "setup": "node ./setup/setup.js", "test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest", - "test:update-snapshots": "yarn test -u", + "test:update-snapshots": "yarn jest -u", "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.test.js\"", "test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"", "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.unittest.js\"",