Skip to content

Reproduce a ticket related to jsx-async-runtime when run in Vitest.

Notifications You must be signed in to change notification settings

pauleveritt/vitest-jsx-async-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsx-async-runtime and Vitest

Explain a ticket in the jsx-async-runtime repo about rendering inside a Vitest test.

Summary

  1. Run npm run console to see it work correctly outside Vitest.

  2. Run npm run test to see it fail when running inside Vitest.

Here is the traceback:

TypeError: Cannot read properties of undefined (reading 'call')
    at Module.o (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/jsx-async-runtime/dist/esm/index.js:1:2181)
    at Module.o (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/jsx-async-runtime/dist/esm/index.js:1:2071)
    at Module.o (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/jsx-async-runtime/dist/esm/index.js:1:2215)
    at /Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/hello.tsx:11:16
    at VitestExecutor.runModule (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/vite-node/dist/client.mjs:397:5)
    at VitestExecutor.directRequest (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/vite-node/dist/client.mjs:379:5)
    at VitestExecutor.cachedRequest (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/vite-node/dist/client.mjs:204:14)
    at VitestExecutor.dependencyRequest (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/vite-node/dist/client.mjs:257:12)
    at /Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/hello.test.tsx:3:31
    at VitestExecutor.runModule (file:///Users/pauleveritt/WebstormProjects/vitest-jsx-async-runtime/node_modules/vite-node/dist/client.mjs:397:5)

About

Reproduce a ticket related to jsx-async-runtime when run in Vitest.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published