Hi All,
We are trying to repackage ef-datetime-picker component using StencilJS. Integration worked well, we are able to use the component. However we are having trouble in executing automated testcase using Jest.
Jest Version : 29
babel version : 7
StencilJs version: 4
Added below code in stencil.config file to parse the component as we were getting import errors.
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!(@refinitiv|lit|@lit|@stencil|ionicons)/)",
],
without the above transformIgnorePatterns below is the exact error.
SyntaxError: Cannot use import statement outside a module
> 1❘ import "@refinitiv-ui/elements/number-field/themes/ds/light";
Λ
2 | import "@refinitiv-ui/elements/icon/themes/ds/light";
3 | import "@refinitiv-ui/elements/tooltip/themes/ds/light";
4
dispatchEvent(
ΑΛΛΛΛΛ
at
with transformIgnorePatterns we are receiving following error.
custom-datetime-picker › renders
App did not load in allowed time. Please ensure the content loads a stencil application.
5 | it("renders", async () => {
6 | const page = await newE2EPage();
> 7 | await page.setContent("<custom-datetime-picker></custom-datetime-picker>");
| ^
8 | const element = await page.find("custom-datetime-picker");
9 | expect(element).toHaveClass("hydrated");
Please suggest how to resolve these errors.