Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solid-markdown v2 causes Vitest tests to error #27

Open
JasperVandenberghen opened this issue Dec 4, 2023 · 0 comments
Open

solid-markdown v2 causes Vitest tests to error #27

JasperVandenberghen opened this issue Dec 4, 2023 · 0 comments

Comments

@JasperVandenberghen
Copy link

JasperVandenberghen commented Dec 4, 2023

stderr | unknown test
Module "util" has been externalized for browser compatibility. Cannot access "util.deprecate" in client code. See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

 ❯ src/pages/package/Package.test.tsx (0)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/pages/package/Package.test.tsx [ src/pages/package/Package.test.tsx ]
TypeError: util.deprecate is not a function
 ❯ node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js:18:24
 ❯ __require node_modules/.vitest/deps/chunk-5WWUZCGV.js:8:50
 ❯ node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js:9:19
 ❯ __require node_modules/.vitest/deps/chunk-5WWUZCGV.js:8:50
 ❯ node_modules/.pnpm/micromark@3.2.0/node_modules/micromark/dev/lib/create-tokenizer.js:31:25

The new version seems to break Vitest test, when removing the SolidMarkdown components from the rendered page all tests pass.

Relevant packages:

    "solid-js": "^1.8.6",
    "solid-markdown": "^2.0.0",
    "typescript": "^5.3.2",
    "vite": "^4.5.0",
    "vite-plugin-solid": "^2.7.2",
    "@solidjs/testing-library": "^0.8.4",
    "@testing-library/jest-dom": "^6.1.4",
    "vitest": "^0.34.6"

Stackblitz link with error recreated , run pnpm run test command to recreate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant