Error when running `npm test` or `npm run lint-test`
See original GitHub issueI recently completed the Is Leap for Javascript.
- I tried to run my tests with the command
javascript npm test
. - I went to the link provided by the CLI.
- Expected: to see the results of my unit tests,
- Actual: I got a Type Error.
cannot assign to read only property ‘Symbol(Symbol.toStringTag)’ of object
Here’s my “exercism debug”:
**** Debug Information ****
Exercism CLI Version: 2.3.0
Exercism CLI Latest Release: 2.3.0
OS/Architecture: ubuntu, x64
Build OS/Architecture /
Home Dir: /Users/ngethe
Config file: /Users/ngethe/.exercism.json
API Key: *******
Exercises Directory: /Users/ngethe/exercism/javascript
> exercism-javascript@0.0.0 test /home/ngethe/exercism/javascript/leap
> jest --no-cache ./*
**ERROR MESSAGE**
FAIL ./leap.spec.js
● Test suite failed to run
TypeError: Cannot assign to read only property 'Symbol(Symbol.toStringTag)' of object '#<process>'
at exports.default (node_modules/jest-util/build/create_process_object.js:15:34)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.444s
Ran all test suites matching /.\/README.md|.\/isLeap.js|.\/leap.spec.js|.\/node_modules|.\/package-lock.json|.\/package.json/i.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How to prevent npm run lint from fixing errors automatically?
I have a GitHub action workflow checking the code style and using npm run lint is wrong because the workflow fixes the code...
Read more >npm ERR! Missing script: "lint" [Solved] | bobbyhadz
If you try to run the command from a different directory, it won't find your package.json file and the Missing script: "lint" npm...
Read more >NPM — How to Run ESLint --fix From npm Script - Future Studio
A typical command is to run the test suite for the project. ... to the ESLint fix command, you may lint your code...
Read more >Problem to run tests with command 'npm run test' before code ...
Hi @plcgi1 – welcome to Discuss! ... This seems to indicate that on Node 17 you'll get that DOMException error you are seeing,...
Read more >ESLint - npm
Make sure your plugins (and ESLint) are both in your project's package. · Make sure you have run npm install and all your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@micalgenus Yes. This project does not use
create-react-app
and the issue was in Jest. I just happened to find that issue in create-react-app repo and used that issue link.Alright so we need to update Jest. I tried doing the same after Jest 24 released recently and ran into all sorts of weird issues due to babel 7 (ref) I will give it a try again today.
@caledrummond90 I don’t know why you posted this in this issue, but there is no
build
script inexercism/javascript
, and no testsuite.html.