diff --git a/tests-js/desktop-builder.test.mjs b/tests-js/desktop-builder.test.mjs index 08164191c5..e33d7d8635 100644 --- a/tests-js/desktop-builder.test.mjs +++ b/tests-js/desktop-builder.test.mjs @@ -18,7 +18,8 @@ test('desktop development composition reuses prepared icon pixels instead of pro run: (command, args) => commands.push([command, ...args]), }) expect(readFileSync(join(input.source, 'apps/desktop/assets/icon.ico'), 'utf8')).toBe('prepared packaging icon') - const compile = commands.find(command => command.some(arg => arg.endsWith('/scripts/build/desktop.mjs'))) + // path.join builds platform-native separators, so accept both `/` and `\`. + const compile = commands.find(command => command.some(arg => /[/\\]scripts[/\\]build[/\\]desktop\.mjs$/.test(arg))) expect(compile[compile.indexOf('--icons') + 1]).toBe(input.icons) }) afterEach(() => { for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true }) })