mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-12 00:05:49 +08:00
fix test on windows
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user