Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vite-web-test-runner-plugin sourcemap bug repro
diff --git a/examples/react/package.json b/examples/react/package.json
index a2e752b..9176945 100644
--- a/examples/react/package.json
+++ b/examples/react/package.json
@@ -6,7 +6,7 @@
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
- "test": "web-test-runner \"src/**/*.test.jsx\" --coverage"
+ "test": "web-test-runner \"src/**/*.test.ts\" --coverage"
},
"dependencies": {
"react": "^17.0.0",
@@ -18,6 +18,6 @@
"@web/test-runner": "^0.12.17",
"chai": "^4.3.4",
"vite": "^2.1.3",
- "vite-web-test-runner-plugin": "file:../.."
+ "vite-web-test-runner-plugin": "^0.1.0"
}
}
diff --git a/examples/react/src/foo.test.ts b/examples/react/src/foo.test.ts
new file mode 100644
index 0000000..e8697f5
--- /dev/null
+++ b/examples/react/src/foo.test.ts
@@ -0,0 +1,10 @@
+import { foo } from './foo';
+
+describe('foo', () => {
+ it('ok', () => {
+ @foo
+ class Foo {}
+ console.log('foo', Foo);
+ throw new Error('something err');
+ });
+});
diff --git a/examples/react/src/foo.ts b/examples/react/src/foo.ts
new file mode 100644
index 0000000..622e633
--- /dev/null
+++ b/examples/react/src/foo.ts
@@ -0,0 +1,3 @@
+export function foo(arg) {
+ console.log('foo arg name:', arg.name);
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment