Skip to content

Commit

Permalink
Merge pull request finos#678 from yt-ms/fix-running-tests-not-as-root
Browse files Browse the repository at this point in the history
tests: fix problem with running tests when not root
  • Loading branch information
Thels authored Dec 16, 2024
2 parents 3fb024d + 7f769d8 commit 0c2eaf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/src/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('CLI Integration Tests', () => {

beforeAll(async () => {
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), integrationTestPrefix));
await callNpmFunction(`${projectRoot}`, 'link');
await callNpxFunction(`${projectRoot}/../..`, 'link cli'); // Link the CLI package to the top-level node_modules
}, millisPerSecond * 20);

afterAll(async () => {
Expand Down Expand Up @@ -164,7 +164,7 @@ describe('CLI Integration Tests', () => {
});


async function callNpmFunction(projectRoot: string, command: string) {
await execPromise(`npm ${command}`, { cwd: projectRoot });
async function callNpxFunction(projectRoot: string, command: string) {
await execPromise(`npx ${command}`, { cwd: projectRoot });
}

0 comments on commit 0c2eaf6

Please sign in to comment.