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
Hello! I am trying to use this action to track tests for my Javascript app that uses vitest. When following the vitest section of the guide, the command to run the test errors out. Any idea what causes this?
Step:
- run: npm run build --if-present
- name: Configure Datadog Test Visibility
uses: datadog/test-visibility-github-action@v2
with:
languages: js
service: {{ service_name }}
api_key: ${{ secrets.DD_API_KEY }}
site: datadoghq.com # Change if your site is not US1
- name: Run tests
run: npm run test
env:
NODE_OPTIONS: -r ${{ env.DD_TRACE_PACKAGE }} --import ${{ env.DD_TRACE_ESM_IMPORT }}
Error:
failed to load config from {{path_to_file}}/vitest.config.ts
⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯
SyntaxError: Identifier '$haml' has already been declared
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
The text was updated successfully, but these errors were encountered:
Until the upstream dependency (import-in-the-middle) is fixed, there's nothing we can do sadly. I'll keep you updated if there are any news.
In any case, if you could share a small reproducible case to confirm my assessment that'd be very useful. You can run your vitests directly without datadog/test-visibility-github-action (see instructions):
- run: npm run build --if-present
- name: Install dd-tracerun: npm install --save-dev dd-trace
- name: Run testsrun: npm run testenv:
NODE_OPTIONS: -r dd-trace/ci/init --import dd-trace/register.js
Hello! I am trying to use this action to track tests for my Javascript app that uses vitest. When following the vitest section of the guide, the command to run the test errors out. Any idea what causes this?
Step:
Error:
The text was updated successfully, but these errors were encountered: