You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unit testing a Yeoman generator has consistently failed to execute. Here are error messages using various test runs:
Mocha:
at new NodeError (internal/errors.js:322:7)
at throwExportsNotFound (internal/modules/esm/resolve.js:332:9)
at packageExportsResolve (internal/modules/esm/resolve.js:523:7)
at resolveExports (internal/modules/cjs/loader.js:450:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
... <local test call>
Jest
Cannot find module 'yeoman-test' from '__tests__/app.test.ts' // arbitrary location
1 | import path from 'path';
2 | import assert from 'yeoman-assert';
> 3 | import helpers from 'yeoman-test';
| ^
4 |
5 | describe('<generator>:app', () => {
6 | beforeAll(() => {
at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
at Object.<anonymous> (__tests__/app.test.ts:3:1)
I've seen multiple generators failing because of this.
The text was updated successfully, but these errors were encountered:
We should consider backward-compatibility and not have to force users to move to ECMA. Companies using this have to seriously consider the consequences of not unit testing their generators and having to rely on older versions while maintaining their generators. Sure, reverting to 6 is OK, but when one runs npm outdated or has Renovate (or equivalent) automating their updates, they have to take steps to disable this. Let's make it simple.
unit testing a Yeoman generator has consistently failed to execute. Here are error messages using various test runs:
Mocha:
Jest
I've seen multiple generators failing because of this.
The text was updated successfully, but these errors were encountered: