Skip to content

Commit

Permalink
Add node and browsers test config
Browse files Browse the repository at this point in the history
  • Loading branch information
hieu-w committed Dec 31, 2024
1 parent 7b87c17 commit 2c2a819
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/config/chrome.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [nodePolyfills({ include: ["buffer"] })],
test: {
reporters: "verbose",
browser: {
screenshotFailures: false,
headless: true,
provider: "playwright",
name: "chromium",
enabled: true,
},
coverage: {
reporter: ["text"],
provider: "istanbul",
include: ["src/**/*.ts"],
},
},
});
21 changes: 21 additions & 0 deletions test/config/firefox.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [nodePolyfills({ include: ["buffer"] })],
test: {
reporters: "verbose",
browser: {
screenshotFailures: false,
headless: true,
provider: "playwright",
name: "firefox",
enabled: true,
},
coverage: {
reporter: ["text"],
provider: "istanbul",
include: ["src/**/*.ts"],
},
},
});
13 changes: 13 additions & 0 deletions test/config/node.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
reporters: "verbose",
coverage: {
reporter: ["text"],
provider: "istanbul",
include: ["src/**/*.ts"],
},
environment: "node",
},
});
21 changes: 21 additions & 0 deletions test/config/safari.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [nodePolyfills({ include: ["buffer"] })],
test: {
reporters: "verbose",
browser: {
screenshotFailures: false,
headless: true,
provider: "playwright",
name: "webkit",
enabled: true,
},
coverage: {
reporter: ["text"],
provider: "istanbul",
include: ["src/**/*.ts"],
},
},
});

0 comments on commit 2c2a819

Please sign in to comment.