kit icon indicating copy to clipboard operation
kit copied to clipboard

Allow unit test files in params directory

Open vekunz opened this issue 3 years ago • 0 comments

Describe the problem

We try to write unit tests for every piece of code. Therefore we also want to write unit tests for matchers. We put the unit test files in the same directory as the code file. So because we have a wellknown.ts in the params directory, we also want to have a wellknown.spec.ts file.

But if we put such a file there, SvelteKit (svelte-kit sync) throws an error:

Matcher names can only have underscores and alphanumeric characters — "wellknown.spec.ts" is invalid

Describe the proposed solution

It would be great if SvelteKit allows unit test files inside the params directory.

I think this would include these files:

  • *.spec.ts
  • *.test.ts
  • *.spec.js
  • *.test.js

Alternatives considered

An alternative would be to move the unit test files to another place. But this would not be consistent anymore with every other unit test file in our projects.

Importance

would make my life easier

Additional Information

No response

vekunz avatar Nov 10 '22 09:11 vekunz