Skip to content

Commit ab0b482

Browse files
committed
test(integ): migrate test:integration:legacy:since:release to pnp
1 parent cee9036 commit ab0b482

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/integ-legacy/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const { execSync, spawn } = require("child_process");
55

66
const ROOT = resolve(join(__dirname, "..", ".."));
77
const FEATURES_FOLDER = join(ROOT, "features");
8-
const ROOT_BIN = join(ROOT, "node_modules", ".bin");
98

109
const execOptions = {
1110
...process,
@@ -19,7 +18,7 @@ console.info(`Looking for changed clients that has the legacy integration test t
1918

2019
let changedPackages = [];
2120
try {
22-
changedPackages = execSync(`${join(ROOT_BIN, "lerna")} changed`, execOptions).split("\n");
21+
changedPackages = execSync("yarn exec lerna changed", execOptions).split("\n");
2322
} catch (e) {
2423
// Swallow error because Lerna throws if no package changes.
2524
}
@@ -36,11 +35,10 @@ if (tagsToTest.length === 0) {
3635
}
3736

3837
// Cucumber requires cwd to contain the test cases.
39-
const command = `${join("node_modules", ".bin", "cucumber-js")}`;
40-
const args = ["--fail-fast", "-t", `"${tagsToTest.join(" or ")}"`];
41-
console.info(`Running cucumber test: \n${command} ${args.join(" ")}`);
38+
const args = ["exec", "cucumber-js", "--fail-fast", "-t", `"${tagsToTest.join(" or ")}"`];
39+
console.info(`Running cucumber test: \nyarn ${args.join(" ")}`);
4240

43-
const cucumber = spawn(command, args, { ...execOptions, cwd: ROOT, shell: true });
41+
const cucumber = spawn("yarn", args, { ...execOptions, cwd: ROOT, shell: true });
4442
cucumber.stdout.pipe(process.stdout);
4543
cucumber.stderr.pipe(process.stderr);
4644
cucumber.on("close", (code) => {

0 commit comments

Comments
 (0)