summaryrefslogtreecommitdiff
path: root/tests/specs/npm/local_dir_no_duplicate_resolution/main.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/npm/local_dir_no_duplicate_resolution/main.tsx')
-rw-r--r--tests/specs/npm/local_dir_no_duplicate_resolution/main.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/specs/npm/local_dir_no_duplicate_resolution/main.tsx b/tests/specs/npm/local_dir_no_duplicate_resolution/main.tsx
new file mode 100644
index 000000000..efb95ec90
--- /dev/null
+++ b/tests/specs/npm/local_dir_no_duplicate_resolution/main.tsx
@@ -0,0 +1,10 @@
+// this previously was ending up with two preacts and would crash
+import { useMemo } from "preact/hooks";
+import renderToString from "preact-render-to-string";
+
+function Test() {
+ useMemo(() => "test", []);
+ return <div>Test</div>;
+}
+
+const html = renderToString(<Test />);