Open suuunly opened 5 days ago
Have you followed node requirements? https://github.com/yeoman/yeoman-test/blob/19d6cbb093041194929855b6453f6411255edde1/package.json#L84
node:test
is a built-in node module:
https://nodejs.org/api/test.html#mockfnoriginal-implementation-options
mock.fn([original[, implementation]][, options])[#](https://nodejs.org/api/test.html#mockfnoriginal-implementation-options)
Added in: v19.1.0, v18.13.0
Ok it's not using node. Another runtime https://bun.sh.
node:test support status https://bun.sh/docs/runtime/nodejs-apis#node-test
See https://github.com/oven-sh/bun/issues/5090.
I can drop node:
prefix if https://www.npmjs.com/package/test works for you.
Hey @mshima Thank you for the swift reply! ❤️
I tried installing the suggested default npm test library, which worked fine.
I then tried to hop into the node_modules/yeoman-test, and removed the node:
prefix on all the node:test
references. Which then results in the following error:
error: Cannot find package "yeoman-environment" from "/Users/my-path/generator-bun-app/node_modules/yeoman-test/dist/default-environment.js"
So I think it may be a more integrated issue than just node:test. Which is fair, since you've not focused on Bun 😁
yeoman-environment is an optional dependency. You should install manually.
Hey, I wanted to use the latest yeoman-test library, but when I run it I get the following error:
The project is written in Bun
1.1.24
. Do you have any plans for supporting bun? Or perhaps you know of a clever solution around this issue, where I can add node:test to the package? 😁Thank you, any help is much appreciated! ❤️