Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed Apr 1, 2024
1 parent 3e062fb commit 0d1b1a6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/integration/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ suite('integration', () => {
const callThisToolByMethod = {
cli: function (ydir, args, env) {
return spawnSync(
'yarn', ['node', pathToCli, ...args, ydir], {
'yarn', ['node', pathToCli, ...args], {
cwd: path.dirname(pathToCli),
stdio: ['ignore', 'pipe', 'pipe'],
encoding: 'utf8',
Expand Down Expand Up @@ -112,6 +112,7 @@ suite('integration', () => {
) {
// callMethod MUST NOT influence the output ...
const expectedOutSnap = path.join(snapshotsPath, `${purpose}_${testSetup}.json.bin`)
const testbedPath = path.join(testbedsPath, testSetup)

const args = [
'-vvv',
Expand All @@ -121,9 +122,11 @@ suite('integration', () => {
'--output-format', 'JSON',
...additionalArgs
]
const res = callThisTool(
path.join(testbedsPath, testSetup),
args, additionalEnv)
if (callThisTool === callThisToolByMethod.cli) {
args.push(testbedPath)
}

const res = callThisTool(testbedPath, args, additionalEnv)
assert.strictEqual(res.error, undefined)
assert.strictEqual(res.status, 0, res.output)

Expand Down

0 comments on commit 0d1b1a6

Please sign in to comment.