Skip to content

Commit 3e597e5

Browse files
committed
chore(coverage): ignore Function guard from coverage as it is unreachable
1 parent 1bab1cc commit 3e597e5

17 files changed

+62
-47
lines changed

badges/coverage-badge.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index-browser-esm.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,9 +1337,12 @@ const SafeEval = {
13371337
evalCallExpression(ast, subs) {
13381338
const args = ast.arguments.map(arg => SafeEval.evalAst(arg, subs));
13391339
const func = SafeEval.evalAst(ast.callee, subs);
1340+
/* c8 ignore start */
13401341
if (func === Function) {
1342+
// unreachable since BLOCKED_PROTO_PROPERTIES includes 'constructor'
13411343
throw new Error('Function constructor is disabled');
13421344
}
1345+
/* c8 ignore end */
13431346
return func(...args);
13441347
},
13451348
evalAssignmentExpression(ast, subs) {

dist/index-browser-esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-umd.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,9 +1343,12 @@
13431343
evalCallExpression(ast, subs) {
13441344
const args = ast.arguments.map(arg => SafeEval.evalAst(arg, subs));
13451345
const func = SafeEval.evalAst(ast.callee, subs);
1346+
/* c8 ignore start */
13461347
if (func === Function) {
1348+
// unreachable since BLOCKED_PROTO_PROPERTIES includes 'constructor'
13471349
throw new Error('Function constructor is disabled');
13481350
}
1351+
/* c8 ignore end */
13491352
return func(...args);
13501353
},
13511354
evalAssignmentExpression(ast, subs) {

dist/index-browser-umd.min.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-node-cjs.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,9 +1338,12 @@ const SafeEval = {
13381338
evalCallExpression(ast, subs) {
13391339
const args = ast.arguments.map(arg => SafeEval.evalAst(arg, subs));
13401340
const func = SafeEval.evalAst(ast.callee, subs);
1341+
/* c8 ignore start */
13411342
if (func === Function) {
1343+
// unreachable since BLOCKED_PROTO_PROPERTIES includes 'constructor'
13421344
throw new Error('Function constructor is disabled');
13431345
}
1346+
/* c8 ignore end */
13441347
return func(...args);
13451348
},
13461349
evalAssignmentExpression(ast, subs) {

dist/index-node-esm.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,9 +1336,12 @@ const SafeEval = {
13361336
evalCallExpression(ast, subs) {
13371337
const args = ast.arguments.map(arg => SafeEval.evalAst(arg, subs));
13381338
const func = SafeEval.evalAst(ast.callee, subs);
1339+
/* c8 ignore start */
13391340
if (func === Function) {
1341+
// unreachable since BLOCKED_PROTO_PROPERTIES includes 'constructor'
13401342
throw new Error('Function constructor is disabled');
13411343
}
1344+
/* c8 ignore end */
13421345
return func(...args);
13431346
},
13441347
evalAssignmentExpression(ast, subs) {

docs/ts/classes/EvalClass.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/ts/classes/JSONPathClass.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/ts/functions/JSONPath.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)