Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 4be50a8

Browse files
committed
test: fix e2e test for windows
1 parent 0b25639 commit 4be50a8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

e2e/test-cross-env-shell.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@ async function runTests() {
9191
},
9292
},
9393
{
94-
name: 'Shell command with multiple statements',
94+
name: 'Shell command with environment variable in command',
9595
test: async () => {
96-
const result = await runShellCommand('echo "first"; echo "second"', {
97-
SEPARATOR: ';',
96+
const result = await runShellCommand('echo $MESSAGE', {
97+
MESSAGE: 'hello from shell',
9898
})
99-
const lines = result.stdout.trim().split('\n')
100-
if (lines.length < 2) {
99+
if (!result.stdout.trim().includes('hello from shell')) {
101100
throw new Error(
102-
`Expected at least 2 lines, got ${lines.length}: '${result.stdout.trim()}'`,
101+
`Expected output to contain 'hello from shell', got '${result.stdout.trim()}'`,
103102
)
104103
}
105104
},

0 commit comments

Comments
 (0)