Skip to content

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

@ItsHarper

Description

@ItsHarper

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

expectTrue(value(Measure.dimension(unitSystem, "length")).hasType<TestMeasure<{ length: 1; mass: 0; time: 0 }>>());

to

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

measureTypeTests.ts still compiles just fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions