-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Please confirm that you have searched existing issues in the repo
Yes, I have searched the existing issues
Any related issues?
No response
Tell us about your environment
Win 11
MarkBind version
5.5.3
Describe the bug and the steps to reproduce it
After majority of test files were migrated to Typescript, the jest configuration files also need to be updated appropriately.
Notice that:
Both ts
and js
files are being run for tests! This could have been potentially doubling all testcase run times. (although not literally - tests are run in parallel).
This also translates to longer GitHub Actions runtimes for PRs, etc:
For example, see:
@markbind/core: FAIL test/unit/plugins/default/mermaid.test.js
@markbind/core: FAIL test/unit/plugins/default/mermaid.test.ts
Both the js and ts files are being run, although they are testing the same thing.
Implementing a simple fix for this can help with the developer experience immensely.
Expected behavior
Don't run duplicated test files.
Either run the ts, or the js file, or maybe run by file name.
Anything else?
Think there's some other backlog that might have been forgotten in the process:
markbind/packages/core/jest.config.js
Lines 1 to 15 in 8c9de42
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ | |
module.exports = { | |
verbose: true, | |
preset: 'ts-jest/presets/js-with-babel', | |
testEnvironment: 'node', | |
collectCoverage: true, | |
// Disable type-checking for test files until we have fully adapted to TypeScript. | |
// Temporarily remove the below lines if you need to type-check the test files | |
// as you run the tests. | |
globals: { | |
'ts-jest': { | |
isolatedModules: true, | |
}, | |
}, | |
}; |
Some investigation here would be good too!