Created
July 16, 2021 10:38
-
-
Save reekoheek/332dce6c76c582da9cadbd22544b5bb5 to your computer and use it in GitHub Desktop.
vite-web-test-runner-plugin sourcemap bug repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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