@flemist/test-variants 3.0.1 → 3.0.2
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/dist/bundle/browser.js
CHANGED
|
@@ -588,8 +588,9 @@ error:e.error}:{args:e.args
|
|
|
588
588
|
},le(_,e.args,c,a,u,i,s))}}else{
|
|
589
589
|
if(!ie(e.args,h,u))return
|
|
590
590
|
;if(!se(e.args,c,a,u,i))return
|
|
591
|
-
;var o=void 0!==e.error?{
|
|
592
|
-
}:{args:e.args}
|
|
591
|
+
;le(_,e.args,c,a,u,i,s);var o=void 0!==e.error?{
|
|
592
|
+
args:e.args,error:e.error}:{args:e.args}
|
|
593
|
+
;_.pendingLimits.push(o)
|
|
593
594
|
}else(null==_.count||e.index<_.count)&&(_.count=e.index);else{
|
|
594
595
|
if(_.index<0)throw new Error("[testVariantsIterator] addLimit() requires at least one next() call")
|
|
595
596
|
;(null==_.count||_.index<_.count)&&(_.count=_.index,
|
|
@@ -250,7 +250,7 @@ function testVariantsIterator(options) {
|
|
|
250
250
|
}
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
|
-
// addLimit({args}) or addLimit({args, error}) - pending limit
|
|
253
|
+
// addLimit({args}) or addLimit({args, error}) - pending limit + immediate per-arg limits
|
|
254
254
|
if (hasArgs && !hasIndex) {
|
|
255
255
|
// Validate args keys match iterator's arg names
|
|
256
256
|
if (!validateArgsKeys(_options.args, keysSet, keysCount)) {
|
|
@@ -260,7 +260,9 @@ function testVariantsIterator(options) {
|
|
|
260
260
|
if (!validateStaticArgsValues(_options.args, templates, keys, keysCount, equals)) {
|
|
261
261
|
return; // Discard - unreproducible (value not in template)
|
|
262
262
|
}
|
|
263
|
-
//
|
|
263
|
+
// Apply per-arg limits immediately for static templates
|
|
264
|
+
updateArgLimits(state, _options.args, templates, keys, keysCount, equals, limitArgOnError);
|
|
265
|
+
// Store as pending limit for count/position-based limiting
|
|
264
266
|
const pending = typeof _options.error !== 'undefined'
|
|
265
267
|
? { args: _options.args, error: _options.error }
|
|
266
268
|
: { args: _options.args };
|
|
@@ -246,7 +246,7 @@ function testVariantsIterator(options) {
|
|
|
246
246
|
}
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
|
-
// addLimit({args}) or addLimit({args, error}) - pending limit
|
|
249
|
+
// addLimit({args}) or addLimit({args, error}) - pending limit + immediate per-arg limits
|
|
250
250
|
if (hasArgs && !hasIndex) {
|
|
251
251
|
// Validate args keys match iterator's arg names
|
|
252
252
|
if (!validateArgsKeys(_options.args, keysSet, keysCount)) {
|
|
@@ -256,7 +256,9 @@ function testVariantsIterator(options) {
|
|
|
256
256
|
if (!validateStaticArgsValues(_options.args, templates, keys, keysCount, equals)) {
|
|
257
257
|
return; // Discard - unreproducible (value not in template)
|
|
258
258
|
}
|
|
259
|
-
//
|
|
259
|
+
// Apply per-arg limits immediately for static templates
|
|
260
|
+
updateArgLimits(state, _options.args, templates, keys, keysCount, equals, limitArgOnError);
|
|
261
|
+
// Store as pending limit for count/position-based limiting
|
|
260
262
|
const pending = typeof _options.error !== 'undefined'
|
|
261
263
|
? { args: _options.args, error: _options.error }
|
|
262
264
|
: { args: _options.args };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flemist/test-variants",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Runs a test function with all possible combinations of its parameters.",
|
|
5
5
|
"main": "dist/lib/index.cjs",
|
|
6
6
|
"module": "dist/lib/index.mjs",
|
|
@@ -32,24 +32,6 @@
|
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"_prepublishOnly": "pnpm run audit && pnpm run lint && pnpm run build && pnpm run test:mocha:ci && npm login",
|
|
37
|
-
"audit": "pnpm audit --prod",
|
|
38
|
-
"lint": "eslint ./**/*.{js,cjs,mjs,ts,tsx}",
|
|
39
|
-
"lint:fix": "eslint --fix ./**/*.{js,cjs,mjs,ts,tsx}",
|
|
40
|
-
"lint:wizard": "eslint-nibble --cache --multi ./**/*.{js,cjs,mjs,ts,tsx}",
|
|
41
|
-
"build:js": "rimraf dist/lib && cpy \"**/assets/**\" \"**/*.{js,cjs,mjs}\" \"../dist/lib/\" --parents --cwd=src && rollup -c",
|
|
42
|
-
"build": "rimraf dist && pnpm run build:js",
|
|
43
|
-
"coverage:merge": "rimraf tmp/coverage/{all,merge} && cp-flat \"tmp/coverage/*/json/**/*.json\" \"tmp/coverage/merge\" && nyc report -r lcov --report-dir tmp/coverage/all/lcov --temp-dir \"tmp/coverage/merge/\"",
|
|
44
|
-
"coverage:check": "pnpm run coverage:merge && nyc check-coverage --report-dir tmp/coverage/all/lcov --lines 50 --functions 50 --branches 50 --statements 50",
|
|
45
|
-
"test:mocha": "mocha ./src/**/*.test.*",
|
|
46
|
-
"test:mocha:coverage": "rimraf tmp/coverage/mocha && nyc --all mocha ./src/**/*.test.*",
|
|
47
|
-
"test:mocha:watch": "mocha --watch ./src/**/*.test.*",
|
|
48
|
-
"test:karma": "rimraf tmp/coverage/karma && karma start --single-run --log-level debug",
|
|
49
|
-
"test:mocha:ci": "rimraf tmp/coverage/mocha && nyc --all mocha ./{src,dist/lib}/**/*.test.*",
|
|
50
|
-
"coveralls": "pnpm run coverage:check && nyc report --reporter=text-lcov --temp-dir \"tmp/coverage/merge/\" | coveralls",
|
|
51
|
-
"mcp:tools": "mcp-project-tools"
|
|
52
|
-
},
|
|
53
35
|
"devDependencies": {
|
|
54
36
|
"@anthropic-ai/claude-code": "^2.0.76",
|
|
55
37
|
"@babel/core": "7.18.5",
|
|
@@ -105,5 +87,22 @@
|
|
|
105
87
|
"@flemist/async-utils": "^1.0.0",
|
|
106
88
|
"@flemist/time-limits": "^1.0.1",
|
|
107
89
|
"tslib": "2.5.3"
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"audit": "pnpm audit --prod",
|
|
93
|
+
"lint": "eslint ./**/*.{js,cjs,mjs,ts,tsx}",
|
|
94
|
+
"lint:fix": "eslint --fix ./**/*.{js,cjs,mjs,ts,tsx}",
|
|
95
|
+
"lint:wizard": "eslint-nibble --cache --multi ./**/*.{js,cjs,mjs,ts,tsx}",
|
|
96
|
+
"build:js": "rimraf dist/lib && cpy \"**/assets/**\" \"**/*.{js,cjs,mjs}\" \"../dist/lib/\" --parents --cwd=src && rollup -c",
|
|
97
|
+
"build": "rimraf dist && pnpm run build:js",
|
|
98
|
+
"coverage:merge": "rimraf tmp/coverage/{all,merge} && cp-flat \"tmp/coverage/*/json/**/*.json\" \"tmp/coverage/merge\" && nyc report -r lcov --report-dir tmp/coverage/all/lcov --temp-dir \"tmp/coverage/merge/\"",
|
|
99
|
+
"coverage:check": "pnpm run coverage:merge && nyc check-coverage --report-dir tmp/coverage/all/lcov --lines 50 --functions 50 --branches 50 --statements 50",
|
|
100
|
+
"test:mocha": "mocha ./src/**/*.test.*",
|
|
101
|
+
"test:mocha:coverage": "rimraf tmp/coverage/mocha && nyc --all mocha ./src/**/*.test.*",
|
|
102
|
+
"test:mocha:watch": "mocha --watch ./src/**/*.test.*",
|
|
103
|
+
"test:karma": "rimraf tmp/coverage/karma && karma start --single-run --log-level debug",
|
|
104
|
+
"test:mocha:ci": "rimraf tmp/coverage/mocha && nyc --all mocha ./{src,dist/lib}/**/*.test.*",
|
|
105
|
+
"coveralls": "pnpm run coverage:check && nyc report --reporter=text-lcov --temp-dir \"tmp/coverage/merge/\" | coveralls",
|
|
106
|
+
"mcp:tools": "mcp-project-tools"
|
|
108
107
|
}
|
|
109
|
-
}
|
|
108
|
+
}
|