diff --git a/config/default.json b/config/default.json index 21863dd..f8ccf7f 100644 --- a/config/default.json +++ b/config/default.json @@ -363,6 +363,12 @@ }, { "$ref": "#/files/paths/releaserc" + }, + { + "$ref": "#/files/paths/tests" + }, + { + "$ref": "#/files/paths/vitestconfigjs" } ] }, diff --git a/templates/nodecli/tests/app.test.js b/templates/nodecli/tests/app.test.js new file mode 100644 index 0000000..87a9b58 --- /dev/null +++ b/templates/nodecli/tests/app.test.js @@ -0,0 +1,7 @@ +import { describe, it, expect } from "vitest"; + +describe("app", () => { + it("should always pass", () => { + expect(true).toBe(true); + }); +}); diff --git a/templates/nodecli/vitest.config.js b/templates/nodecli/vitest.config.js new file mode 100644 index 0000000..90d7a00 --- /dev/null +++ b/templates/nodecli/vitest.config.js @@ -0,0 +1,12 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + environment: "node", + testTimeout: 60000, + resolveSnapshotPath(path, extension) { + return path + extension; + }, + include: ["tests/**/*.test.js"], + }, +});