spec
spec copied to clipboard
Fix the test suite so that it passes for Windows
Currently most of the tests fails when running the test suite on windows in the pipeline (well, on real machines too I expect).
The problem is that paths on windows use \ instead of /, which creates test fails such as these:
[spec_cli]: Expected: contains 'PASS test/my_test.dart'
[spec_cli]: Actual: ' PASS test\\another_test.dart\n'
[spec_cli]: ' PASS test\\my_test.dart\n'
[spec_cli]: '\n'
[spec_cli]: 'Test Suites: 2 passed, 2 total\n'
[spec_cli]: 'Tests: 3 passed, 3 total\n'
[spec_cli]: 'Time: 00:00:00\n'
[spec_cli]: ''
I can't think of any other solution than to pass all the strings through some function that fixes the paths depending on platform in all the tests.