aboutsummaryrefslogtreecommitdiff
path: root/vitest.config.js
diff options
context:
space:
mode:
authorJacob Scearcy <jacobscearcy@gmail.com>2024-05-06 06:42:35 -0700
committerGitHub <noreply@github.com>2024-05-06 14:42:35 +0100
commit80e2bd66f54bca88a749d40784828d29bae8995f (patch)
tree587a8b2d24f09e1955f11ab1ae7ca1e16084d4e1 /vitest.config.js
parent8adbae91d3e7d526b5950e2299736ab915dc5489 (diff)
downloadlustre-80e2bd66f54bca88a749d40784828d29bae8995f.tar.gz
lustre-80e2bd66f54bca88a749d40784828d29bae8995f.zip
๐Ÿ”€ Use vitest for runtime/vdom testing. (#124)
* ๐Ÿงช move tests into test directory, bump birdie to ignore non-gleam files * implement feedback * add comments, update doc
Diffstat (limited to 'vitest.config.js')
-rw-r--r--vitest.config.js18
1 files changed, 18 insertions, 0 deletions
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}`)
+ },
+});