-
Notifications
You must be signed in to change notification settings - Fork 106
[Bug:] SyntaxError: Unexpected token 'export' #3720
Copy link
Copy link
Open
Labels
Impacts: CoreImpacts the core DS primarily, changes may occur in other themes as well.Impacts the core DS primarily, changes may occur in other themes as well.Impacts: DocumentationIndicates that this item relates to documentationIndicates that this item relates to documentationImpacts: HealthcareImpacts the Healthcare.gov theme directly.Impacts the Healthcare.gov theme directly.Impacts: MedicareImpacts the Medicare theme directly.Impacts the Medicare theme directly.Status: In JIRAIndicates that this item is also tracked in JiraIndicates that this item is also tracked in JiraStatus: Work In ProgressPR's that are not yet ready for reviewPR's that are not yet ready for reviewdependenciesPull requests that update a dependency filePull requests that update a dependency filejavascriptPull requests that update javascript codePull requests that update javascript code
Description
Metadata
Metadata
Assignees
Labels
Impacts: CoreImpacts the core DS primarily, changes may occur in other themes as well.Impacts the core DS primarily, changes may occur in other themes as well.Impacts: DocumentationIndicates that this item relates to documentationIndicates that this item relates to documentationImpacts: HealthcareImpacts the Healthcare.gov theme directly.Impacts the Healthcare.gov theme directly.Impacts: MedicareImpacts the Medicare theme directly.Impacts the Medicare theme directly.Status: In JIRAIndicates that this item is also tracked in JiraIndicates that this item is also tracked in JiraStatus: Work In ProgressPR's that are not yet ready for reviewPR's that are not yet ready for reviewdependenciesPull requests that update a dependency filePull requests that update a dependency filejavascriptPull requests that update javascript codePull requests that update javascript code
Describe the Bug
vitest is unable to pass certain tests within our repo, of which use the cmsgov-design-system node package. Please note, not all of our tests fail but these 12 do.
To reproduce
git clone https://github.cms.gov/PQDC/pqdc-dkangit fetchgit checkout https://github.cms.gov/PQDC/pqdc-dkan/pull/1872cd src/frontendnpm inpm run testExpected behavior
within our repo, npm run test generates the following error message:
This is causing 12 tests to fail. Screenshot below for context:

Please note, the work-around was unsuccesful.
Severity/Impact
Medium: Product teams can use workaround but still blocker
Desktop Operating System
MacOS 14.6.1
Desktop Browser Name
No response
Desktop Browser Version
No response
Device
No response
Mobile Operating System
No response
Mobile Browser Name
No response
Mobile Browser Version
No response
Additional context
In short, I think https://github.com/CMSgov/design-system/blob/main/package.json needs to have a
type: "module"property for vitest to be satisfied.Please note, our work-around may be to just not make vitest required for deployment.
Codebase/Repository URL
https://github.cms.gov/PQDC/pqdc-dkan
Design System Version
^12.0.0
Existing branch or Pull request on Github
https://github.cms.gov/PQDC/pqdc-dkan/pull/1872
Team Name
PDC