fix test on windows

This commit is contained in:
Slawomir Jaranowski
2020-01-24 10:01:30 +01:00
parent e385db4b9a
commit e6531e7184
3 changed files with 7 additions and 7 deletions

View File

@ -244,7 +244,7 @@ test('cleanup - not generated', () => {
expect(consoleOutput).toEqual(
expect.arrayContaining([
expect.stringMatching(/Cleanup maven setings: \..+\/\.m2\/settings.xml - file wasn\'t generated by action/)
expect.stringMatching(/Cleanup maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml - file wasn\'t generated by action/)
])
);
})
@ -257,7 +257,7 @@ test('cleanup - not exist', () => {
expect(consoleOutput).toEqual(
expect.arrayContaining([
expect.stringMatching(/::warning::Cleanup maven setings: \..+\/\.m2\/settings.xml - file not exist/)
expect.stringMatching(/::warning::Cleanup maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml - file not exist/)
])
);
})
@ -271,7 +271,7 @@ test('cleanup - ok', () => {
expect(consoleOutput).toEqual(
expect.arrayContaining([
expect.stringMatching(/Cleanup maven setings: \..+\/\.m2\/settings.xml - file was removed/)
expect.stringMatching(/Cleanup maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml - file was removed/)
])
);
expect(fs.existsSync(settingsPath)).not.toBeTruthy();