Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/catalyst/src/cli/commands/build.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Command } from 'commander';
import { execa } from 'execa';
import { join } from 'node:path';
import { expect, test, vi } from 'vitest';

import { program } from '../program';
Expand Down Expand Up @@ -33,7 +34,7 @@ test('calls execa with Next.js build if framework is nextjs', async () => {
await program.parseAsync(['node', 'catalyst', 'build', '--framework', 'nextjs', '--debug']);

expect(execa).toHaveBeenCalledWith(
'node_modules/.bin/next',
join('node_modules', '.bin', 'next'),
['build', '--debug'],
expect.objectContaining({
stdio: 'inherit',
Expand Down
3 changes: 2 additions & 1 deletion packages/catalyst/src/cli/commands/dev.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Command } from 'commander';
import { execa } from 'execa';
import { join } from 'node:path';
import { expect, test, vi } from 'vitest';

import { program } from '../program';
Expand All @@ -25,7 +26,7 @@ test('calls execa with Next.js development server', async () => {
await program.parseAsync(['node', 'catalyst', 'dev', '-p', '3001']);

expect(execa).toHaveBeenCalledWith(
'node_modules/.bin/next',
join('node_modules', '.bin', 'next'),
['dev', '-p', '3001'],
expect.objectContaining({
stdio: 'inherit',
Expand Down
5 changes: 3 additions & 2 deletions packages/catalyst/src/cli/commands/start.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Command } from 'commander';
import { execa } from 'execa';
import { join } from 'node:path';
import { afterEach, beforeAll, beforeEach, expect, test, vi } from 'vitest';

import { consola } from '../lib/logger';
Expand Down Expand Up @@ -66,7 +67,7 @@ test('calls execa with Next.js production optimized server', async () => {
]);

expect(execa).toHaveBeenCalledWith(
'node_modules/.bin/next',
join('node_modules', '.bin', 'next'),
['start', '--port', '3001'],
expect.objectContaining({
stdio: 'inherit',
Expand All @@ -93,7 +94,7 @@ test('calls execa with OpenNext production optimized server', async () => {
'opennextjs-cloudflare',
'preview',
'--config',
'.bigcommerce/wrangler.jsonc',
join('.bigcommerce', 'wrangler.jsonc'),
'--port',
'3001',
],
Expand Down
Loading