Skip to content

Commit

Permalink
run npm with shell (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Apr 26, 2024
1 parent b053f93 commit eb4951c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/test-integration.mjs
Expand Up @@ -31,18 +31,18 @@ describe('integration tests', function () {
});

//console.log('command-ts with test: Running npm install');
const res = await doSpawn(npmCommand, ['i'], { cwd: runResult.env.cwd });
const res = await doSpawn(npmCommand, ['i'], { cwd: runResult.env.cwd, shell: true });
if (res.exitCode !== 0) {
assert.fail(`npm installed failed: stdout ${res.stdout} stderr ${res.stderr}`);
}

const resAudit = await doSpawn(npmCommand, ['audit'], { cwd: runResult.env.cwd });
const resAudit = await doSpawn(npmCommand, ['audit'], { cwd: runResult.env.cwd, shell: true });
if (resAudit.exitCode !== 0) {
assert.fail(`npm audit failed: stdout ${resAudit.stdout} stderr ${resAudit.stderr}`);
}

//console.log('command-ts with test: Running extension compile');
const res2 = await doSpawn(npmCommand, ['run', 'test'], { cwd: runResult.env.cwd });
const res2 = await doSpawn(npmCommand, ['run', 'test'], { cwd: runResult.env.cwd, shell: true });
if (res2.exitCode !== 0) {
assert.fail(`npm run test failed: stdout ${res2.stdout} stderr ${res2.stderr}`);
}
Expand All @@ -64,18 +64,18 @@ describe('integration tests', function () {
openWith: 'skip'
});

const res = await doSpawn(npmCommand, ['i'], { cwd: runResult.env.cwd });
const res = await doSpawn(npmCommand, ['i'], { cwd: runResult.env.cwd, shell: true });
if (res.exitCode !== 0) {
assert.fail(`npm installed failed: stdout ${res.stdout} stderr ${res.stderr}`);
}

const resAudit = await doSpawn(npmCommand, ['audit'], { cwd: runResult.env.cwd });
const resAudit = await doSpawn(npmCommand, ['audit'], { cwd: runResult.env.cwd, shell: true });
if (resAudit.exitCode !== 0) {
assert.fail(`npm audit failed: stdout ${resAudit.stdout} stderr ${resAudit.stderr}`);
}

//console.log('command-ts-webpack with test: Running extension compile');
const res2 = await doSpawn(npmCommand, ['run', 'test'], { cwd: runResult.env.cwd });
const res2 = await doSpawn(npmCommand, ['run', 'test'], { cwd: runResult.env.cwd, shell: true });
if (res2.exitCode !== 0) {
assert.fail(`npm run compile failed: stdout ${res2.stdout} stderr ${res2.stderr}`);
}
Expand All @@ -96,18 +96,18 @@ describe('integration tests', function () {
openWith: 'skip'
});

const res = await doSpawn(npmCommand, ['i'], { cwd: runResult.env.cwd });
const res = await doSpawn(npmCommand, ['i'], { cwd: runResult.env.cwd, shell: true });
if (res.exitCode !== 0) {
assert.fail(`npm installed failed: stdout ${res.stdout} stderr ${res.stderr}`);
}

const resAudit = await doSpawn(npmCommand, ['audit'], { cwd: runResult.env.cwd });
const resAudit = await doSpawn(npmCommand, ['audit'], { cwd: runResult.env.cwd, shell: true });
if (resAudit.exitCode !== 0) {
assert.fail(`npm audit failed: stdout ${resAudit.stdout} stderr ${resAudit.stderr}`);
}

//console.log('command-ts-web with test: Running extension compile-web');
const res2 = await doSpawn(npmCommand, ['run', 'test'], { cwd: runResult.env.cwd });
const res2 = await doSpawn(npmCommand, ['run', 'test'], { cwd: runResult.env.cwd, shell: true });
if (res2.exitCode !== 0) {
assert.fail(`npm run test failed: stdout ${res2.stdout} stderr ${res2.stderr}`);
}
Expand Down

0 comments on commit eb4951c

Please sign in to comment.