Skip to content

Commit

Permalink
fix failing elm tests on windows by normalizing path
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophP committed May 20, 2022
1 parent 9f350a2 commit 35e4785
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/core/integration-tests/test/elm.js
Expand Up @@ -7,6 +7,7 @@ import {
run,
outputFS,
} from '@parcel/test-utils';
import {normalizePath} from '@parcel/utils';

describe('elm', function () {
it('should produce a basic Elm bundle', async function () {
Expand Down Expand Up @@ -83,6 +84,10 @@ describe('elm', function () {
});

it('should produce correct formatting and indentation when compilation fails', async function () {
const normalizedPath = normalizePath(
'test/integration/elm-compile-error/src/Main.elm',
false,
);
await assert.rejects(
() =>
bundle(path.join(__dirname, 'integration/elm-compile-error/index.js'), {
Expand All @@ -95,7 +100,7 @@ describe('elm', function () {
{
message:
'\n' +
'-- TYPE MISMATCH --------------- test/integration/elm-compile-error/src/Main.elm\n' +
`-- TYPE MISMATCH --------------- ${normalizedPath}\n` +
'\n' +
'The 1st argument to `text` is not what I expect:\n' +
'\n' +
Expand All @@ -116,7 +121,7 @@ describe('elm', function () {
{
message:
'\n' +
'-- TOO MANY ARGS --------------- test/integration/elm-compile-error/src/Main.elm\n' +
`-- TOO MANY ARGS --------------- ${normalizedPath}\n` +
'\n' +
'The `text` function expects 1 argument, but it got 2 instead.\n' +
'\n' +
Expand Down

0 comments on commit 35e4785

Please sign in to comment.