<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can not run jest test after migrate strato to 0.100 in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224111#M522</link>
    <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59122"&gt;@beigert&lt;/a&gt;&amp;nbsp;unfortunately I can't help you further. Please create a support ticket in&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://one.dynatrace.com/hc/en-us/requests" target="_blank" rel="noopener noreferrer"&gt;https://one.dynatrace.com/hc/en-us/requests&lt;/A&gt;&amp;nbsp;with a reference to this thread and the error messages. Our developers need to have a detailed look at it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thx,&lt;BR /&gt;Sini&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 12:52:28 GMT</pubDate>
    <dc:creator>sinisa_zubic</dc:creator>
    <dc:date>2023-09-28T12:52:28Z</dc:date>
    <item>
      <title>Can not run jest test after migrate strato to 0.100</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/223992#M518</link>
      <description>&lt;P&gt;After migration `@dynatrace/strato-components-preview` from 0.99 to 0.104 every unit test is failing with the same error:&lt;BR /&gt;&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;FAIL src/app/components/BuildsOverTimeContainer.spec.tsx&lt;BR /&gt;● Test suite failed to run&lt;/P&gt;&lt;P&gt;Jest encountered an unexpected token&lt;/P&gt;&lt;P&gt;Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.&lt;/P&gt;&lt;P&gt;Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.&lt;/P&gt;&lt;P&gt;By default "node_modules" folder is ignored by transformers.&lt;/P&gt;&lt;P&gt;Here's what you can do:&lt;BR /&gt;• If you are trying to use ECMAScript Modules, see &lt;A href="https://jestjs.io/docs/ecmascript-modules" target="_blank"&gt;https://jestjs.io/docs/ecmascript-modules&lt;/A&gt; for how to enable it.&lt;BR /&gt;• If you are trying to use TypeScript, see &lt;A href="https://jestjs.io/docs/getting-started#using-typescript" target="_blank"&gt;https://jestjs.io/docs/getting-started#using-typescript&lt;/A&gt;&lt;BR /&gt;• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.&lt;BR /&gt;• If you need a custom transformation specify a "transform" option in your config.&lt;BR /&gt;• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.&lt;/P&gt;&lt;P&gt;You'll find more details and examples of these config options in the docs:&lt;BR /&gt;&lt;A href="https://jestjs.io/docs/configuration" target="_blank"&gt;https://jestjs.io/docs/configuration&lt;/A&gt;&lt;BR /&gt;For information about custom transformations, see:&lt;BR /&gt;&lt;A href="https://jestjs.io/docs/code-transformation" target="_blank"&gt;https://jestjs.io/docs/code-transformation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;P&gt;/Users/user/code/dynatrace/node_modules/@dynatrace/strato-design-tokens/colors/index.esm.js:15&lt;BR /&gt;...&lt;BR /&gt;SyntaxError: Unexpected token 'export'&lt;/P&gt;&lt;P&gt;at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)&lt;BR /&gt;at Object.&amp;lt;anonymous&amp;gt; (node_modules/@dynatrace/strato-components-preview/core/index.cjs.js:131:30)```&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;jest.config.ts:&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;import type { Config } from "@jest/types";&lt;/P&gt;&lt;P&gt;import { stratoPreset } from "@dynatrace/strato-components-preview/testing/jest";&lt;/P&gt;&lt;P&gt;const config: Config.InitialOptions = {&lt;BR /&gt;&amp;nbsp; preset: "ts-jest",&lt;BR /&gt;&amp;nbsp; testEnvironment: "jsdom",&lt;BR /&gt;roots: ["&amp;lt;rootDir&amp;gt;/src"],&lt;BR /&gt;&amp;nbsp; setupFiles: ["@dynatrace/strato-components-preview/testing"],&lt;BR /&gt;&amp;nbsp; transform: {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ".(css|scss|sass|less)$": "&amp;lt;rootDir&amp;gt;/style-mock.ts",&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;&amp;nbsp; setupFilesAfterEnv: [`&amp;lt;rootDir&amp;gt;/src/jest-setup.ts`],&lt;BR /&gt;&amp;nbsp; ...stratoPreset,&lt;BR /&gt;&amp;nbsp; moduleNameMapper: {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ...stratoPreset.moduleNameMapper,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "^libs/(.*)": "&amp;lt;rootDir&amp;gt;/src/libs/$1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "^components/(.*)": "&amp;lt;rootDir&amp;gt;/src/app/components/$1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "^hooks/(.*)": "&amp;lt;rootDir&amp;gt;/src/app/hooks/$1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "^contexts/(.*)": "&amp;lt;rootDir&amp;gt;/src/app/contexts/$1",&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;export default config;&lt;BR /&gt;```&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 13:06:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/223992#M518</guid>
      <dc:creator>beigert</dc:creator>
      <dc:date>2023-09-27T13:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can not run jest test after migrate strato to 0.100</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224021#M520</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59122"&gt;@beigert&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Can you add this in your module name resolution config (&lt;SPAN&gt;jest.config.ts)&lt;/SPAN&gt;:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  moduleNameMapper: {
    "^@dynatrace/strato-design-tokens/(.*)$": "&amp;lt;rootDir&amp;gt;/node_modules/@dynatrace/strato-design-tokens/$1",
    "^@dynatrace/strato-design-tokens$": "&amp;lt;rootDir&amp;gt;/node_modules/@dynatrace/strato-design-tokens",
  },&lt;/LI-CODE&gt;
&lt;P&gt;and check if this fixes your problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 17:04:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224021#M520</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-09-27T17:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can not run jest test after migrate strato to 0.100</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224086#M521</link>
      <description>&lt;P&gt;it helps a little bit: tests that don't import anything from `strato-components-preview` works. However rest of them fail with the same error:&lt;BR /&gt;&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;FAIL src/app/components/BuildsOverTimeContainer.spec.tsx&lt;BR /&gt;● Test suite failed to run&lt;/P&gt;&lt;P&gt;Jest encountered an unexpected token&lt;/P&gt;&lt;P&gt;Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.&lt;/P&gt;&lt;P&gt;Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.&lt;/P&gt;&lt;P&gt;By default "node_modules" folder is ignored by transformers.&lt;/P&gt;&lt;P&gt;Here's what you can do:&lt;BR /&gt;• If you are trying to use ECMAScript Modules, see &lt;A href="https://jestjs.io/docs/ecmascript-modules" target="_blank"&gt;https://jestjs.io/docs/ecmascript-modules&lt;/A&gt; for how to enable it.&lt;BR /&gt;• If you are trying to use TypeScript, see &lt;A href="https://jestjs.io/docs/getting-started#using-typescript" target="_blank"&gt;https://jestjs.io/docs/getting-started#using-typescript&lt;/A&gt;&lt;BR /&gt;• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.&lt;BR /&gt;• If you need a custom transformation specify a "transform" option in your config.&lt;BR /&gt;• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.&lt;/P&gt;&lt;P&gt;You'll find more details and examples of these config options in the docs:&lt;BR /&gt;&lt;A href="https://jestjs.io/docs/configuration" target="_blank"&gt;https://jestjs.io/docs/configuration&lt;/A&gt;&lt;BR /&gt;For information about custom transformations, see:&lt;BR /&gt;&lt;A href="https://jestjs.io/docs/code-transformation" target="_blank"&gt;https://jestjs.io/docs/code-transformation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;P&gt;/Users/przemyslawbeigert/code/dynatrace/pipeline-observability-application/node_modules/@dynatrace/strato-components-preview/index.esm.js:2&lt;BR /&gt;export * from "@dynatrace/strato-components-preview/buttons";&lt;BR /&gt;^^^^^^&lt;/P&gt;&lt;P&gt;SyntaxError: Unexpected token 'export'&lt;/P&gt;&lt;P&gt;&amp;gt; 1 | import { Flex, Skeleton } from "@dynatrace/strato-components-preview";&lt;BR /&gt;| ^&lt;BR /&gt;2 | import { TimeseriesChart } from "@dynatrace/strato-components-preview/charts";&lt;BR /&gt;3 | import Colors from "@dynatrace/strato-design-tokens/colors";&lt;BR /&gt;4 | import { InformationIcon } from "@dynatrace/strato-icons";&lt;/P&gt;&lt;P&gt;at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)&lt;BR /&gt;at Object.&amp;lt;anonymous&amp;gt; (src/app/components/BuildsOverTimeContainer.tsx:1:1)&lt;BR /&gt;at Object.&amp;lt;anonymous&amp;gt; (src/app/components/BuildsOverTimeContainer.spec.tsx:10:1)&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 09:46:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224086#M521</guid>
      <dc:creator>beigert</dc:creator>
      <dc:date>2023-09-28T09:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can not run jest test after migrate strato to 0.100</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224111#M522</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/59122"&gt;@beigert&lt;/a&gt;&amp;nbsp;unfortunately I can't help you further. Please create a support ticket in&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://one.dynatrace.com/hc/en-us/requests" target="_blank" rel="noopener noreferrer"&gt;https://one.dynatrace.com/hc/en-us/requests&lt;/A&gt;&amp;nbsp;with a reference to this thread and the error messages. Our developers need to have a detailed look at it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thx,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 12:52:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224111#M522</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-09-28T12:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can not run jest test after migrate strato to 0.100</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224541#M529</link>
      <description>&lt;P&gt;It works, however after clear the cache by `rm -rf node_modules/.cache`. However pls update docs:&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/testing/unit-tests/" target="_blank"&gt;https://developer.dynatrace.com/develop/testing/unit-tests/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:44:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224541#M529</guid>
      <dc:creator>beigert</dc:creator>
      <dc:date>2023-10-04T08:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can not run jest test after migrate strato to 0.100</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224710#M532</link>
      <description>&lt;P&gt;Just synced with the team about this.&lt;/P&gt;
&lt;P&gt;this workaround won't be needed anymore with design system version 0.106.2 and design tokens version 0.19.0&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 07:04:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Can-not-run-jest-test-after-migrate-strato-to-0-100/m-p/224710#M532</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-10-06T07:04:31Z</dc:date>
    </item>
  </channel>
</rss>

