Skip to content

Commit

Permalink
Skip playwright tests for starter kits when only running command.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstubbs committed Dec 30, 2024
1 parent f87d356 commit a861dbd
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion starters/nextjs-starter-approuter-ts/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineConfig, devices } from '@playwright/test';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
testDir: './playwright-tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
3 changes: 2 additions & 1 deletion starters/nextjs-starter-approuter-ts/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import { configDefaults, defineConfig } from "vitest/config";

export default defineConfig(({ mode }) => {
return {
Expand All @@ -9,6 +9,7 @@ export default defineConfig(({ mode }) => {
reportsDirectory: `./coverage`,
},
setupFiles: ["./setupVitest.js"],
exclude: [...configDefaults.exclude, "./playwright-tests/*"],
},
plugins: [react()],
};
Expand Down
2 changes: 1 addition & 1 deletion starters/nextjs-starter-ts/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineConfig, devices } from '@playwright/test';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
testDir: './playwright-tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
3 changes: 2 additions & 1 deletion starters/nextjs-starter-ts/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import { configDefaults, defineConfig } from "vitest/config";

export default defineConfig(({ mode }) => {
return {
Expand All @@ -9,6 +9,7 @@ export default defineConfig(({ mode }) => {
reportsDirectory: `./coverage`,
},
setupFiles: ["./setupVitest.js"],
exclude: [...configDefaults.exclude, "./playwright-tests/*"],
},
plugins: [react()],
};
Expand Down
2 changes: 1 addition & 1 deletion starters/nextjs-starter/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineConfig, devices } from "@playwright/test";
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
testDir: "./playwright-tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
3 changes: 2 additions & 1 deletion starters/nextjs-starter/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import { configDefaults, defineConfig } from "vitest/config";

export default defineConfig(({ mode }) => {
return {
Expand All @@ -9,6 +9,7 @@ export default defineConfig(({ mode }) => {
reportsDirectory: `./coverage`,
},
setupFiles: ["./setupVitest.js"],
exclude: [...configDefaults.exclude, "./playwright-tests/*"],
},
plugins: [react()],
};
Expand Down

0 comments on commit a861dbd

Please sign in to comment.