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

Commit 8618182

Browse files
committed
fix(test): Add build module before run cmd tests
1 parent 702fbbe commit 8618182

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

test/cmd-apps-spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ describe('Apps:run from console', () => {
5252
});
5353
});
5454
it('rucken prepare --app --root ./test/fixture', () => {
55-
const file = path.resolve(`${__dirname}/../dist/bin/app.js`);
55+
npmRun.execSync('npm run build', { cwd: dirRoot });
56+
const file = path.resolve(`${dirRoot}/dist/bin/app.js`);
5657
const commandString = 'node ' + file + ' prepare --app --root ./test/fixture' + (debug ? ' --verbose' : '');
5758
const commandBin = commandString.split(' ')[0];
5859
const commandArgs = commandString.split(' ').filter((arg: string, index: number) => index > 0);

test/cmd-libs-spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ describe('Libs:run from console', () => {
5151
});
5252
});
5353
it('rucken prepare --lib --root ./test/fixture', () => {
54-
const file = path.resolve(`${__dirname}/../dist/bin/app.js`);
54+
npmRun.execSync('npm run build', { cwd: dirRoot });
55+
const file = path.resolve(`${dirRoot}/dist/bin/app.js`);
5556
const commandString = 'node ' + file + ' prepare--lib --root./ test / fixture' + (debug ? ' --verbose' : '');
5657
const commandBin = commandString.split(' ')[0];
5758
const commandArgs = commandString.split(' ').filter((arg: string, index: number) => index > 0);

0 commit comments

Comments
 (0)