Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive test result #269

Open
Eternal-Rise opened this issue Aug 3, 2022 · 0 comments
Open

False positive test result #269

Eternal-Rise opened this issue Aug 3, 2022 · 0 comments

Comments

@Eternal-Rise
Copy link

Eternal-Rise commented Aug 3, 2022

All test cases matched as passed, but one of them failed with error.

> metacalc@0.0.2 test
> npm run lint && npm run types && metatests test/unit.js


> metacalc@0.0.2 lint
> eslint . && prettier -c "**/*.js" "**/*.json" "**/*.md" "**/.*rc" "**/*.ts"

Checking formatting...
All matched files use Prettier code style!

> metacalc@0.0.2 types
> tsc -p tsconfig.json

Node v16.16.0 (v8 9.4.146.24-node.21):
Simple expressions .................................... 3/3
Expression chain ...................................... 2/2
JavaScript Math ....................................... 8/8
Correct cell values ................................... 4/4
Non-table identifiers ................................. 3/3
Prevent arbitrary js code execution ................... 7/7
/home/eternal/dev/opensource/metarhia/metacalc/lib/sheet.js:18
      const targetProp = `${prop}.${currentProp}`;
                                    ^

TypeError: Cannot convert a Symbol value to a string
    at Object.get (/home/eternal/dev/opensource/metarhia/metacalc/lib/sheet.js:18:37)
    at Proxy.toString (<anonymous>)
    at Object.isError [as identify] (/home/eternal/dev/opensource/metarhia/metacalc/node_modules/metatests/lib/utils.js:45:50)
    at /home/eternal/dev/opensource/metarhia/metacalc/node_modules/yaml/dist/Schema-88e323a7.js:396:42
    at Array.find (<anonymous>)
    at findTagObject (/home/eternal/dev/opensource/metarhia/metacalc/node_modules/yaml/dist/Schema-88e323a7.js:396:15)
    at createNode (/home/eternal/dev/opensource/metarhia/metacalc/node_modules/yaml/dist/Schema-88e323a7.js:409:16)
    at Schema.createNode (/home/eternal/dev/opensource/metarhia/metacalc/node_modules/yaml/dist/Schema-88e323a7.js:507:12)
    at stringify (/home/eternal/dev/opensource/metarhia/metacalc/node_modules/yaml/dist/Document-9b4560a1.js:190:19)
    at Document.toString (/home/eternal/dev/opensource/metarhia/metacalc/node_modules/yaml/dist/Document-9b4560a1.js:737:20)

Reproducing: https://github.com/Eternal-Rise/metacalc/tree/false-positive-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant