Skip to content
JC Franco edited this page Jan 27, 2025 · 11 revisions

tags: [tips, tricks, dev]

Tips

  1. For speedier CI test troubleshooting, you can update the include prop under the test object in vite.config.ts to only run a specific suite (see example).

    test: {
      include: ["**/<component-to-focus-tests-on>.{e2e,spec}.?(c|m)[jt]s?(x)"],
    }

    Just remember to restore it to its previous state after troubleshooting and before merging. 😅

  2. You can use Chromatic builds + online code editors (e.g., CodePen) for extra testing without having to update storybook stories or publish to NPM. Example: https://codepen.io/jcfranco/pen/RwYRyGW This is no longer possible with the latest Storybook + Vite build

  3. To be able to use npm link our packages with vite builds, make sure to add the following to vite.config.ts:

    optimizeDeps: {
      exclude: ["@esri/calcite-components"]
    }

    see https://dev.to/hontas/using-vite-with-linked-dependencies-37n7

  4. You can run tests within VS Code by using the preconfigured test runners (see https://github.com/Esri/calcite-design-system/blob/dev/.vscode/launch.json and https://code.visualstudio.com/docs/editor/debugging#_run-and-debug-view for more details).