Skip to content

Commit 4b0ffcc

Browse files
committed
fixup! Snapshot test output.
1 parent f28caae commit 4b0ffcc

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

libraries/rush-lib/src/logic/test/ChangeFiles.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe(ChangeFiles.name, () => {
3434
expect(
3535
terminalProvider
3636
.getAllOutputAsChunks({ asLines: true })
37-
.map((chunk) => chunk.replace(FORWARD_SLASH_DIRNAME, '<TEST DIR>'))
37+
.map((chunk) => Path.convertToSlashes(chunk).replace(FORWARD_SLASH_DIRNAME, '<TEST DIR>'))
3838
).toMatchSnapshot();
3939
});
4040

@@ -176,7 +176,10 @@ describe(ChangeFiles.name, () => {
176176
});
177177
fail('Expected validateAsync to throw');
178178
} catch (error) {
179-
const normalizedMessage: string = error.message.replace(FORWARD_SLASH_DIRNAME, '<TEST DIR>');
179+
const normalizedMessage: string = Path.convertToSlashes(error.message).replace(
180+
FORWARD_SLASH_DIRNAME,
181+
'<TEST DIR>'
182+
);
180183
expect(normalizedMessage).toMatchSnapshot();
181184
}
182185
});
@@ -204,7 +207,10 @@ describe(ChangeFiles.name, () => {
204207
});
205208
fail('Expected validateAsync to throw');
206209
} catch (error) {
207-
const normalizedMessage: string = error.message.replace(FORWARD_SLASH_DIRNAME, '<TEST DIR>');
210+
const normalizedMessage: string = Path.convertToSlashes(error.message).replace(
211+
FORWARD_SLASH_DIRNAME,
212+
'<TEST DIR>'
213+
);
208214
expect(normalizedMessage).toMatchSnapshot();
209215
}
210216
});

0 commit comments

Comments
 (0)