Skip to content

Commit

Permalink
test: refactor link function to return execa
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Aug 4, 2024
1 parent 250ba49 commit 6ef47da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/specs/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import { testSuite, expect } from 'manten';
import { execa, execaNode } from 'execa';
import { createFixture } from 'fs-fixture';
import { link } from '../utils';
import { link } from '../utils/link.js';

export default testSuite(({ describe }, nodePath: string) => {
describe('cli', ({ test, describe }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/link-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path';
import { testSuite, expect } from 'manten';
import { execa, execaNode } from 'execa';
import { createFixture } from 'fs-fixture';
import { link } from '../utils';
import { link } from '../utils/link.js';

export default testSuite(({ describe }, nodePath: string) => {
describe('link.config.json', ({ test, describe }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/publish.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import { testSuite, expect } from 'manten';
import { execa } from 'execa';
import { createFixture } from 'fs-fixture';
import { link } from '../utils';
import { link } from '../utils/link.js';

export default testSuite(({ describe }, nodePath: string) => {
describe('publish mode', ({ test }) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/utils.ts → tests/utils/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ type Options = {
nodePath: string;
};

export const link = async (
export const link = (
cliArguments: string[],
{
cwd,
nodePath,
}: Options,
) => await execaNode(
) => execaNode(
linkBinPath,
cliArguments,
{
Expand Down

0 comments on commit 6ef47da

Please sign in to comment.