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

build: enable full typescript checking of test files #352

Open
justinmk opened this issue Apr 17, 2024 · 0 comments
Open

build: enable full typescript checking of test files #352

justinmk opened this issue Apr 17, 2024 · 0 comments

Comments

@justinmk
Copy link
Member

Problem

currently, test files are not checked by npm run build, we exclude them in tsconfig:

"exclude": ["node_modules", "__tests__", "**/*.test.ts", "examples", "lib"]

Expected behavior

  • test files should be checked
  • fix all the errors
justinmk added a commit that referenced this issue Apr 17, 2024
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.
justinmk added a commit that referenced this issue Apr 17, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant