From 80e2bd66f54bca88a749d40784828d29bae8995f Mon Sep 17 00:00:00 2001 From: Jacob Scearcy Date: Mon, 6 May 2024 06:42:35 -0700 Subject: =?UTF-8?q?=F0=9F=94=80=20Use=20vitest=20for=20runtime/vdom=20test?= =?UTF-8?q?ing.=20(#124)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🧪 move tests into test directory, bump birdie to ignore non-gleam files * implement feedback * add comments, update doc --- vitest.config.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vitest.config.js (limited to 'vitest.config.js') diff --git a/vitest.config.js b/vitest.config.js new file mode 100644 index 0000000..e0a777d --- /dev/null +++ b/vitest.config.js @@ -0,0 +1,18 @@ +import { configDefaults, defineConfig } from "vitest/config"; +import { basename, dirname, join, resolve } from 'node:path'; + +export default defineConfig({ + test: { + alias: { + '@root': resolve(__dirname) + }, + benchmark: { + include: ["**/test/**/*.bench.js"], + exclude: [...configDefaults.exclude, "**/build/**/*"], + }, + include: ["**/test/**/*.test.js"], + exclude: [...configDefaults.exclude, "**/build/**/*"], + resolveSnapshotPath: (testPath, snapExtension) => + join(join(dirname(testPath), '../', 'vitest_snapshots'), `${basename(testPath)}${snapExtension}`) + }, +}); -- cgit v1.2.3