@procore/hammer-test-jest 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @procore/hammer-test-jest
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d6b682a: Added `--update` or `-u` flag to test command for updating snapshots.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [31f3d8c]
12
+ - Updated dependencies [d6b682a]
13
+ - @procore/hammer-types@0.8.0
14
+
3
15
  ## 0.11.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -12,6 +12,18 @@ Alternatively, you can install it directly:
12
12
  yarn add -D @procore/hammer-test-jest
13
13
  ```
14
14
 
15
+ ## CLI Options
16
+
17
+ The plugin supports `@procore/hammer` CLI options, such as:
18
+
19
+ - `--watch` / `-w` - Watch files for changes and rerun tests
20
+ - `--coverage` - Collect and report test coverage information
21
+ - `--ci` - Run in CI environment mode
22
+ - `--silent` - Prevent tests from printing console messages
23
+ - `--serial` - Run tests serially in the current process
24
+ - `--debug` - Print debugging info about Jest configuration
25
+ - `--update` / `-u` - Update snapshots that are failing in this test run
26
+
15
27
  ## Configuration
16
28
 
17
29
  Custom configuration is done using the `hammer` configuration file. The customization key is `jestOverride`, and the configuration that should be returned should be compatible with the `jest` format.
package/dist/index.d.mts CHANGED
@@ -16,6 +16,7 @@ declare const test: (rootDir: string, config: HammerConfig, options: {
16
16
  silent: boolean;
17
17
  serial: boolean;
18
18
  debug: boolean;
19
+ update: boolean;
19
20
  fileFilters?: string[];
20
21
  }) => Promise<void>;
21
22
 
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ declare const test: (rootDir: string, config: HammerConfig, options: {
16
16
  silent: boolean;
17
17
  serial: boolean;
18
18
  debug: boolean;
19
+ update: boolean;
19
20
  fileFilters?: string[];
20
21
  }) => Promise<void>;
21
22
 
package/dist/index.js CHANGED
@@ -201,13 +201,16 @@ var allowedFlags = [
201
201
  "coverage",
202
202
  "ci",
203
203
  "silent",
204
- "debug"
204
+ "debug",
205
+ "update"
205
206
  ];
206
207
  function generateArgv(options) {
207
208
  const argv = [];
208
209
  for (const [key, value] of Object.entries(options)) {
209
210
  if (value && key === "serial") {
210
211
  argv.push(`--runInBand`);
212
+ } else if (value && key === "update") {
213
+ argv.push(`--updateSnapshot`);
211
214
  } else if (value && allowedFlags.includes(key)) {
212
215
  argv.push(`--${key}`);
213
216
  }
package/dist/index.mjs CHANGED
@@ -160,13 +160,16 @@ var allowedFlags = [
160
160
  "coverage",
161
161
  "ci",
162
162
  "silent",
163
- "debug"
163
+ "debug",
164
+ "update"
164
165
  ];
165
166
  function generateArgv(options) {
166
167
  const argv = [];
167
168
  for (const [key, value] of Object.entries(options)) {
168
169
  if (value && key === "serial") {
169
170
  argv.push(`--runInBand`);
171
+ } else if (value && key === "update") {
172
+ argv.push(`--updateSnapshot`);
170
173
  } else if (value && allowedFlags.includes(key)) {
171
174
  argv.push(`--${key}`);
172
175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/hammer-test-jest",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Hammer test runner, jest",
5
5
  "author": "Procore Technologies, Inc",
6
6
  "homepage": "https://github.com/procore/hammer/packages/test-jest",
@@ -47,7 +47,7 @@
47
47
  "@babel/preset-env": "^7.28.0",
48
48
  "@babel/preset-react": "^7.27.1",
49
49
  "@babel/preset-typescript": "^7.27.1",
50
- "@procore/hammer-types": "^0.7.0",
50
+ "@procore/hammer-types": "^0.8.0",
51
51
  "babel-jest": "^29.7.0",
52
52
  "identity-obj-proxy": "^3.0.0",
53
53
  "jest": "^29.7.0",
@@ -55,13 +55,13 @@
55
55
  "jest-watch-typeahead": "^2.2.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@procore/eslint-config": "^15.2.1",
58
+ "@procore/eslint-config": "^15.3.2",
59
59
  "@procore/prettier-config": "^1.1.1",
60
- "@procore/typescript-config": "^2.0.0",
61
- "@types/node": "^20.19.6",
60
+ "@procore/typescript-config": "^2.1.0",
61
+ "@types/node": "^20.19.11",
62
62
  "@vitest/coverage-v8": "^3.2.4",
63
63
  "del-cli": "^6.0.0",
64
- "eslint": "^9.31.0",
64
+ "eslint": "^9.33.0",
65
65
  "pathe": "^2.0.3",
66
66
  "prettier": "^3.6.2",
67
67
  "tsup": "^8.5.0",