mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-16 08:27:55 +00:00
Add basic JS tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
// Standalone config (separate from vite.config.js) so the PWA plugin isn't loaded during tests.
|
||||
// Tests run in the default "node" environment -- see src/test/setup.js for the minimal window stub
|
||||
// that lets the pure-logic modules import without jsdom.
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: "node",
|
||||
setupFiles: ["./src/test/setup.js"],
|
||||
include: ["src/**/*.test.{js,jsx}"],
|
||||
globals: false, // explicit `import { describe, it, expect } from "vitest"` -> no eslint env change
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user