From 6c8fc73f2f747464e76e4a58e7d3daef3e216002 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Tue, 26 Jun 2018 10:57:17 -0700 Subject: [PATCH] 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 8c080252e..ebd501013 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 b333c6c4a..cc59d3c3c 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\"",