Commit Graph

87175 Commits

Author SHA1 Message Date
Dannon Baker 9133f711fe Update docs from Jest to Vitest
Changed all testing documentation to reference Vitest instead of Jest,
including test commands, mock examples, and VSCode debug config.
2025-11-24 11:09:20 -05:00
Dannon Baker c7560c5511 Delete all remaining jest mocks and config 2025-11-24 11:09:20 -05:00
Dannon Baker 32d826418b Relocate RuleDefinitionsTest to rule builder location 2025-11-24 11:09:19 -05:00
Dannon Baker e513744f79 Remove Jest and switch to Vitest as primary test runner
Updated package.json scripts to use Vitest commands and renamed the
GitHub Actions workflow from jest.yaml to client-unit.yaml.
2025-11-24 11:09:19 -05:00
Dannon Baker a27efb1e0e Fix router-push vitest test mock references
In Vitest, mock.results is a getter that returns fresh data each time
it's accessed, unlike Jest where it was a static array reference.
Changed from caching the reference to accessing mock.results directly
in each assertion.
2025-11-24 11:09:19 -05:00
Dannon Baker c2576aa88f Fix whitespace rendering in NotificationCard template for Vitest
Add explicit spacing between adjacent inline elements in template.
This matches the QuotaMeter fix - Vitest/JSDOM correctly doesn't add
spaces between adjacent elements, which is also the Vue 3 behavior.
2025-11-24 11:09:19 -05:00
Dannon Baker 26356804d2 Fix whitespace rendering in QuotaMeter vitest test
Vitest renders component text without spaces between text nodes, and this is actually a new vue3 behavior coming as well, so it fixes a legitimate bug to add an explicit space here.
2025-11-24 11:09:19 -05:00
Dannon Baker c1141eba8f Migrate remaining tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 6ca9c8c5c6 Migrate Selection and Libraries tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 1c80e64d62 Migrate Upload tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 01f95078ae Migrate Visualizations tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 4de29cf303 Migrate Provider tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 398c243a38 Fix incorrect assertion patterns in vitest tests
Changed 8 instances of expect(condition === value) to proper
expect(value).toBe(expected) assertions. Also fixed a bug in
upload-queue test where mockedProcess was being called instead
of assigned.
2025-11-24 11:09:19 -05:00
Dannon Baker 5338957d55 Migrate Toolshed components tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 82bebc5ad0 Migrate Markdown components tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 97637be951 Migrate Job components tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 63dbfe7b4f Migrate Admin components tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker e2eca4d736 Migrate Workflow Components tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker c1b04f15fa Migrate Workflow Editor tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 3bcb247701 Migrate Panels and Navigation tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 31754b7bd8 Migrate Tool tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker 53c820798b Migrate History UI and Dialog tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker e8e2b3040c Migrate History Core tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker bde8a780bd Migrate Login and Registration tests to Vitest 2025-11-24 11:09:19 -05:00
Dannon Baker e0a1726497 Migrate User Management tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 33402d809a Migrate Dataset and DatasetInformation tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 23f17aed91 Migrate ObjectStore tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 6d4ba6326a Migrate Form Elements and ConfigTemplates tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 5bddde857c Migrate Form tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 772b0bee91 Migrate GridList test to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 108a91155b Migrate Markdown, Page, and misc tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 7bdcb244d8 Migrate Workflow component tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 7a242b6f9d Migrate tool and panel component tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 20b1f45b74 Fix RouterLink errors in vitest tests
Added injectTestRouter helper to vitest helpers and updated
HistoryExportWizard test to use router. This resolves the
"Cannot read properties of undefined (reading 'resolve')"
error that occurred when components use RouterLink.
2025-11-24 11:06:53 -05:00
Dannon Baker 2ba9278b97 Migrate actions test to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker e7d09d70fa Fix BroadcastChannel errors in vitest
Added mock for BroadcastChannel in vitest setup to resolve type mismatch
between Node.js and browser implementations. Pinia uses BroadcastChannel
for state synchronization, which was causing unhandled exceptions during
test runs. The mock extends EventTarget and provides no-op implementations
for postMessage and close methods.
2025-11-24 11:06:53 -05:00
Dannon Baker 06fbd05c58 Migrate FormData test to Vitest and fix vitest infrastructure
Added dispatchEvent helper to vitest helpers, fixed mockHelpPopovers to export default for Vue components. Updated one test expectation for spacing difference in Vitest rendering.
2025-11-24 11:06:53 -05:00
Dannon Baker 51629f3b70 Migrate terminals test to Vitest
Fixed JSON imports to use default import instead of import * as, which Vitest handles differently than Jest. Converted jest.fn/spyOn to vi equivalents.
2025-11-24 11:06:53 -05:00
Dannon Baker 30cc505477 Migrate SwitchToHistoryLink test to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 4d3f8f396f Migrate workflow invocation components to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 1ee40a8f4b Add handsontable mock to vitest setup
Mock handsontable and @handsontable/vue to avoid core-js dependency
issues in Vitest. The commonjs build of handsontable requires old
core-js modules that aren't available.
2025-11-24 11:06:53 -05:00
Dannon Baker 849e5acb95 Migrate ServerSelection test to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 0e4639427b Migrate ObjectStore and notification components to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 5fda7f9abe Apply prettier formatting 2025-11-24 11:06:53 -05:00
Dannon Baker 7a7f2efd9b Migrate HistoryView test to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker c8995b1c6d Register short directive in Vitest helpers 2025-11-24 11:06:53 -05:00
Dannon Baker f156b27905 Fix missing @ prefix in RuleCollectionBuilder import 2025-11-24 11:06:53 -05:00
Dannon Baker cd61af4065 Migrate history component tests to Vitest 2025-11-24 11:06:53 -05:00
Dannon Baker 8e771975f7 Migrate ContentItem test and fix config alias 2025-11-24 11:06:53 -05:00
Dannon Baker 4385f7bb3b Migrate objectstore preference components to Vitest 2025-11-24 11:06:53 -05:00