kukeiko / entity-space

MIT License
5 stars 1 forks source link

allow naming type test files ".test.ts" / ".spec.ts" #161

Closed kukeiko closed 2 years ago

kukeiko commented 2 years ago

What

Allow naming type test files ".test.ts" / ".spec.ts", instead of giving them a suffix that is not picked up by jest.

Why

Because they are tests and should be named as such.

The reason why they're not named already this way is because jest picks them up (I did try excluding those patterns via tsconfig.spec.json exclude property) and gives us an error.

kukeiko commented 2 years ago

finally found a solution! just had to add modulePathIgnorePatterns: ["test/types"] to the jest config. I've added it to the global jest.preset.js we have in root folder.