Skip to content

Commit

Permalink
fix(build): "Cannot find name 'expect'"
Browse files Browse the repository at this point in the history
ref #352

Before:

    src/api/Buffer.test.ts:102:9 - error TS2304: Cannot find name 'expect'.
    ...
    src/api/Buffer.test.ts:106:5 - error TS2593: Cannot find name 'it'.
    Do you need to install type definitions for a test runner? Try `npm
    i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and
    then add 'jest' or 'mocha' to the types field in your tsconfig.
    ...
    Found 616 errors in 8 files.

After:

    Found 138 errors in 6 files.
  • Loading branch information
justinmk committed Apr 17, 2024
1 parent a54ed99 commit 8092b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"target": "es2015",
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"types": ["node"]
"types": ["node", "jest"]
},
"exclude": ["**/node_modules"],
"compileOnSave": false,
Expand Down

0 comments on commit 8092b95

Please sign in to comment.