Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Generate the cjs and mjs system tests from the ts system test #412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hessjcg
Copy link
Collaborator

@hessjcg hessjcg commented Jan 8, 2025

Now, the system tests are only written in TypeScript. There is a very small wrapper to run the tests
using TS, CJS, and MJS module systems. Previously, we had to write a system test 3 times, one for each
module system.

The same tests are now in new TS files:

  • Tests from system-test/mysql2-connect.* are now in mysql-tests.ts
  • Tests from system-test/pg-connect.* are now in pg-tests.ts
  • Tests from system-test/tedious-connect.* are now in tedious-tests.ts

The test "main" files are hand written for TS, MJS, and CJS:

  • system-test/system.ts
    • system-test/system.cjs
    • system-test/system.mjs

Additional small changes were made to the package.json and other supporting scripts.

@hessjcg hessjcg requested a review from a team as a code owner January 8, 2025 23:09
@hessjcg hessjcg changed the title chore: Refactor to generate cjs and mjs test suite chore: Generate the cjs and mjs system tests from the ts system test Jan 8, 2025
@hessjcg hessjcg force-pushed the system-test-ts-only branch 2 times, most recently from ab647d1 to 2288c6a Compare January 8, 2025 23:14
Copy link
Collaborator

@jackwotherspoon jackwotherspoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should tsconfig-systemtest-esm.json and tsconfig-systemtest.json have a hyphen "-" between system and test as to be tsconfig-system-test-esm.json?

Also we should probably get someone who is well versed in Node to review this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants