@procore/hammer-test-jest 0.5.0 → 0.7.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 +66 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +25 -4
- package/dist/index.mjs +24 -3
- package/dist/transforms/file.mjs +2 -2
- package/dist/transforms/file.test.js +398 -530
- package/dist/transforms/file.test.mjs +399 -532
- package/dist/transforms/reactSvg.js +21 -96
- package/dist/transforms/reactSvg.mjs +23 -105
- package/dist/transforms/reactSvg.test.js +451 -629
- package/dist/transforms/reactSvg.test.mjs +452 -631
- package/package.json +17 -17
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# @procore/hammer-test-jest
|
|
2
|
+
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 007e20f: Modify hammer:test command to enable fileFilters option, to allow users to specify a list of files to run tests on when using the hammer:test command.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [007e20f]
|
|
12
|
+
- @procore/hammer-types@0.4.0
|
|
13
|
+
|
|
14
|
+
## 0.6.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- f1e20cc: Added --serial flag for hammer test
|
|
19
|
+
- aab4a72: Added debug flag to hammer test
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [f1e20cc]
|
|
24
|
+
- Updated dependencies [aab4a72]
|
|
25
|
+
- @procore/hammer-types@0.3.1
|
|
26
|
+
|
|
27
|
+
## 0.5.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- c831dd1: Upgrades package dependencies.
|
|
32
|
+
|
|
33
|
+
## 0.4.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- 825ea36: Removes inspect plugin function.
|
|
38
|
+
- b5fd3e6: Updates interface types for test plugins and test CLI interface.
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- ccdff59: Fixes TypeScript configuration, and missing import type directives.
|
|
43
|
+
- 825ea36: Adds @procore/hammer-types to project.
|
|
44
|
+
- Updated dependencies [ccdff59]
|
|
45
|
+
- Updated dependencies [b5fd3e6]
|
|
46
|
+
- Updated dependencies [b5fd3e6]
|
|
47
|
+
- Updated dependencies [ae7df8b]
|
|
48
|
+
- @procore/hammer-types@0.3.0
|
|
49
|
+
|
|
50
|
+
## 0.3.0
|
|
51
|
+
|
|
52
|
+
### Minor Changes
|
|
53
|
+
|
|
54
|
+
- 1a97ddb: Upgrades package dependencies.
|
|
55
|
+
|
|
56
|
+
## 0.2.0
|
|
57
|
+
|
|
58
|
+
### Minor Changes
|
|
59
|
+
|
|
60
|
+
- 9e9fef7: Upgrades package dependencies.
|
|
61
|
+
|
|
62
|
+
### Minor Changes
|
|
63
|
+
|
|
64
|
+
- 8e10c07: Jest plugin for test command
|
|
65
|
+
|
|
66
|
+
## 0.1.0
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -34,12 +34,13 @@ __export(src_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(src_exports);
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/tsup/assets/cjs_shims.js
|
|
37
|
+
// ../../node_modules/.store/tsup-virtual-c87351f6b5/package/assets/cjs_shims.js
|
|
38
38
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
39
39
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
40
40
|
|
|
41
41
|
// src/performTest.ts
|
|
42
42
|
var jest = __toESM(require("jest-cli"));
|
|
43
|
+
var import_child_process = require("child_process");
|
|
43
44
|
|
|
44
45
|
// src/config/utils.ts
|
|
45
46
|
var import_fs2 = __toESM(require("fs"));
|
|
@@ -198,12 +199,15 @@ var allowedFlags = [
|
|
|
198
199
|
"watch",
|
|
199
200
|
"coverage",
|
|
200
201
|
"ci",
|
|
201
|
-
"silent"
|
|
202
|
+
"silent",
|
|
203
|
+
"debug"
|
|
202
204
|
];
|
|
203
205
|
function generateArgv(options) {
|
|
204
206
|
const argv = [];
|
|
205
207
|
for (const [key, value] of Object.entries(options)) {
|
|
206
|
-
if (value &&
|
|
208
|
+
if (value && key === "serial") {
|
|
209
|
+
argv.push(`--runInBand`);
|
|
210
|
+
} else if (value && allowedFlags.includes(key)) {
|
|
207
211
|
argv.push(`--${key}`);
|
|
208
212
|
}
|
|
209
213
|
}
|
|
@@ -213,7 +217,24 @@ function generateArgv(options) {
|
|
|
213
217
|
// src/performTest.ts
|
|
214
218
|
async function performTest(options) {
|
|
215
219
|
const config = JSON.stringify(getConfig(options));
|
|
216
|
-
|
|
220
|
+
const argv = generateArgv(options);
|
|
221
|
+
if (options.debug) {
|
|
222
|
+
const debugCommand = [
|
|
223
|
+
"--inspect-brk",
|
|
224
|
+
"./node_modules/jest/bin/jest.js",
|
|
225
|
+
"--runInBand",
|
|
226
|
+
"--config",
|
|
227
|
+
config,
|
|
228
|
+
...argv
|
|
229
|
+
];
|
|
230
|
+
(0, import_child_process.spawn)("node", debugCommand, { stdio: "inherit" });
|
|
231
|
+
} else {
|
|
232
|
+
const args = ["--config", config, ...argv];
|
|
233
|
+
if (options.fileFilters) {
|
|
234
|
+
args.unshift(...options.fileFilters);
|
|
235
|
+
}
|
|
236
|
+
return jest.run(args);
|
|
237
|
+
}
|
|
217
238
|
}
|
|
218
239
|
|
|
219
240
|
// src/index.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/performTest.ts
|
|
2
2
|
import * as jest from "jest-cli";
|
|
3
|
+
import { spawn } from "child_process";
|
|
3
4
|
|
|
4
5
|
// src/config/utils.ts
|
|
5
6
|
import fs2 from "fs";
|
|
@@ -158,12 +159,15 @@ var allowedFlags = [
|
|
|
158
159
|
"watch",
|
|
159
160
|
"coverage",
|
|
160
161
|
"ci",
|
|
161
|
-
"silent"
|
|
162
|
+
"silent",
|
|
163
|
+
"debug"
|
|
162
164
|
];
|
|
163
165
|
function generateArgv(options) {
|
|
164
166
|
const argv = [];
|
|
165
167
|
for (const [key, value] of Object.entries(options)) {
|
|
166
|
-
if (value &&
|
|
168
|
+
if (value && key === "serial") {
|
|
169
|
+
argv.push(`--runInBand`);
|
|
170
|
+
} else if (value && allowedFlags.includes(key)) {
|
|
167
171
|
argv.push(`--${key}`);
|
|
168
172
|
}
|
|
169
173
|
}
|
|
@@ -173,7 +177,24 @@ function generateArgv(options) {
|
|
|
173
177
|
// src/performTest.ts
|
|
174
178
|
async function performTest(options) {
|
|
175
179
|
const config = JSON.stringify(getConfig(options));
|
|
176
|
-
|
|
180
|
+
const argv = generateArgv(options);
|
|
181
|
+
if (options.debug) {
|
|
182
|
+
const debugCommand = [
|
|
183
|
+
"--inspect-brk",
|
|
184
|
+
"./node_modules/jest/bin/jest.js",
|
|
185
|
+
"--runInBand",
|
|
186
|
+
"--config",
|
|
187
|
+
config,
|
|
188
|
+
...argv
|
|
189
|
+
];
|
|
190
|
+
spawn("node", debugCommand, { stdio: "inherit" });
|
|
191
|
+
} else {
|
|
192
|
+
const args = ["--config", config, ...argv];
|
|
193
|
+
if (options.fileFilters) {
|
|
194
|
+
args.unshift(...options.fileFilters);
|
|
195
|
+
}
|
|
196
|
+
return jest.run(args);
|
|
197
|
+
}
|
|
177
198
|
}
|
|
178
199
|
|
|
179
200
|
// src/index.ts
|
package/dist/transforms/file.mjs
CHANGED
|
@@ -6,9 +6,9 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
6
6
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
// ../../node_modules/tsup/assets/esm_shims.js
|
|
9
|
+
// ../../node_modules/.store/tsup-virtual-c87351f6b5/package/assets/esm_shims.js
|
|
10
10
|
var init_esm_shims = __esm({
|
|
11
|
-
"../../node_modules/tsup/assets/esm_shims.js"() {
|
|
11
|
+
"../../node_modules/.store/tsup-virtual-c87351f6b5/package/assets/esm_shims.js"() {
|
|
12
12
|
"use strict";
|
|
13
13
|
}
|
|
14
14
|
});
|