Skip to content

Commit

Permalink
install dependencies in during test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Ka0o0 committed Oct 2, 2023
1 parent 126ebdf commit 3b6223e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "tsc --version && tsc --project \"./src\"",
"lint": "tsc --project \"./src\" --noEmit && eslint -c .eslintrc.js --ext .ts ./src",
"comparison-tests": "git clean -xfd test/comparison-tests && npm link --legacy-peer-deps ./test/comparison-tests/testLib && npm link --legacy-peer-deps ./test/comparison-tests/sourceMapsShouldConsiderInputSourceMap && node test/comparison-tests/run-tests.js",
"comparison-tests": "git clean -xfd test/comparison-tests && npm link --legacy-peer-deps ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js",
"comparison-tests-generate": "git clean -xfd test/comparison-tests && node test/comparison-tests/stub-new-version.js",
"execution-tests": "git clean -xfd test/execution-tests && node test/execution-tests/run-tests.js",
"test": "git clean -xfd test/comparison-tests && git clean -xfd test/execution-tests && node test/run-tests.js",
Expand Down
4 changes: 4 additions & 0 deletions test/comparison-tests/create-and-execute-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const assert = require("assert");
const os = require('os');
const fs = require('fs-extra');
const execSync = require('child_process').execSync;
const path = require('path');
const mkdirp = require('mkdirp');
const rimraf = require('rimraf');
Expand Down Expand Up @@ -110,6 +111,9 @@ function createTest(test, testPath, options) {
const program = getProgram(path.resolve(paths.testStagingPath, "lib/tsconfig.json"), { newLine: typescript.NewLineKind.LineFeed });
program.emit();
}
if(test === "sourceMapsShouldConsiderInputSourceMap") {
execSync("npm ci", { cwd: paths.testStagingPath, stdio: 'inherit' });
}

// ensure output directories
mkdirp.sync(paths.actualOutput);
Expand Down

0 comments on commit 3b6223e

Please sign in to comment.