Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
fix: resolve module location, don't rely on PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed May 2, 2022
1 parent cd843de commit 633dd16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/nuts/pluginsGenerate.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ describe('plugins:generate', () => {
cwd: sfdxPluginDir,
};

const sfdxPluginYarnTestOutput = shell.exec('yarn mocha --forbid-only test/**/*.test.ts', shellJsOpts);
const nyc = require.resolve('nyc/bin/nyc');
const mocha = require.resolve('mocha/bin/mocha');

const command = `node ${nyc} --extension .ts --require ts-node/register ${mocha} "test/**/*.test.ts"`;
const sfdxPluginYarnTestOutput = shell.exec(command, shellJsOpts);
expect(sfdxPluginYarnTestOutput.code, 'sfdx plugin: yarn test failed').equals(0);

const sfdxPluginBinRunOutput = shell.exec('node ./bin/run hello:org --help', shellJsOpts);
Expand Down

0 comments on commit 633dd16

Please sign in to comment.