Skip to content

Commit d4c50fc

Browse files
committed
test: compatible windows platform
1 parent 46b83cd commit d4c50fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

__tests__/e2e.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
const CLI_PATH = path.join(__dirname, '..')
2020
const projectName = 'electron-vite-test'
2121
const generatePath = path.join(CLI_PATH, projectName)
22+
const pkgManager = process.platform === 'win32' ? 'npm.cmd' : 'npm'
2223
let electronApp: ElectronApplication
2324
let page: Page
2425

@@ -29,7 +30,7 @@ beforeAll(async () => {
2930

3031
// enableElectronMirror()
3132

32-
const installLogs = execSync('npm install')
33+
const installLogs = execSync(`${pkgManager} install`)
3334
writeFileSync('npm-install.log', installLogs)
3435

3536
const buildLogs = execSync('vite build')

0 commit comments

Comments
 (0)