safe-units icon indicating copy to clipboard operation
safe-units copied to clipboard

The type tests in the `test` folder are not being compiled (and therefore tested)

Open ItsHarper opened this issue 6 months ago • 1 comments

I've rewritten #207 to fix the issue. Ignore the below.

~~Thanks for your work on this library!~~

~~I'm aware that it's intentional that only tests in the __test__ folders get executed. The tests in the test folder are meant to be type tests, so in theory they just need to be compiled and not actually run, and they are getting compiled.~~

~~However, I found that if I change this line~~

~~https://github.com/jscheiny/safe-units/blob/664e2d5e5a5d0d2c3f8c984012f9f0761b7f2024/test/measureTypeTests.ts#L20~~

~~to~~

expectTrue(value(Measure.dimension(unitSystem, "length")).hasType<TestMeasure<{ xyzNonsense: 99 }>>());

~~measureTypeTests.ts still compiles just fine.~~

ItsHarper avatar Jun 10 '25 18:06 ItsHarper