Skip to content

Include mjs utility tests in unit script#5375

Open
Akshith-cdr wants to merge 2 commits into
SandeepVashishtha:masterfrom
Akshith-cdr:test/include-mjs-tests-unit-script-3434
Open

Include mjs utility tests in unit script#5375
Akshith-cdr wants to merge 2 commits into
SandeepVashishtha:masterfrom
Akshith-cdr:test/include-mjs-tests-unit-script-3434

Conversation

@Akshith-cdr
Copy link
Copy Markdown
Contributor

@Akshith-cdr Akshith-cdr commented Jun 1, 2026

Description

Fixes #3434

Updated test:unit to use a dedicated unit test runner that discovers and runs existing .mjs utility tests instead of relying on duplicated hardcoded script entries.

Also cleaned up previously unrun utility tests so they work with the Node-based test flow:

  • Converted feedbackUtils.test.mjs to Node test globals and fixed its import/localStorage setup.
  • Converted githubStats.test.mjs away from Vitest-only imports.
  • Updated fetchWithTimeout.test.mjs response mocks to match the current utility response parsing.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots / Video (if applicable)

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have run local unit tests using npm test and verified they pass
  • I have run npm run lint and resolved any new errors or warnings
  • I have verified responsiveness and visual alignment on desktop and mobile viewports

Tests run:

  • node tests\packageJsonIntegrity.test.mjs
  • node --loader file:///C:/Users/veeri/Documents/GSSoC26/Eventra/tests/loaders/jsExtension.mjs tests\feedbackUtils.test.mjs
  • node --loader Eventra/tests/loaders/jsExtension.mjs tests\githubStats.test.mjs
  • node --loader Eventra/tests/loaders/jsExtension.mjs tests\fetchWithTimeout.test.mjs

Note:

  • Full node scripts\run-unit-tests.mjs was attempted, but this local environment stopped at githubProxy.test.mjs because jsonwebtoken was unavailable in node_modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TEST: Include all existing .mjs utility tests in test:unit script

1 participant