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
When i ran unit tests on files that use import { PickerModule } from '@ctrl/ngx-emoji-mart'; the tests are always failing since the JEST is unable to resolve the emoji module.
I found that it is due to the missing "main" parameter in package.json that suppose to point to the compiled .js file.
Since there is no compiled bundle included JEST is unable to resolve it: Cannot find module '@ctrl/ngx-emoji-mart'
And all tests are failing. Is there a good workaround for it? Maybe JEST can be configured to pre-build emoji picker before the import?
I was able to fool JEST by adding the following line to the ngx-emoji-mart package.json but its not a long-term solution obviously. "main": "./test-bundle.js",
When i ran unit tests on files that use
import { PickerModule } from '@ctrl/ngx-emoji-mart';
the tests are always failing since the JEST is unable to resolve the emoji module.I found that it is due to the missing "main" parameter in package.json that suppose to point to the compiled .js file.
Since there is no compiled bundle included JEST is unable to resolve it:
Cannot find module '@ctrl/ngx-emoji-mart'
And all tests are failing. Is there a good workaround for it? Maybe JEST can be configured to pre-build emoji picker before the import?
I was able to fool JEST by adding the following line to the ngx-emoji-mart package.json but its not a long-term solution obviously.
"main": "./test-bundle.js",
test-bundle.js:
The text was updated successfully, but these errors were encountered: