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

Fix codegen-openapi tests #4307

Open
wants to merge 55 commits into
base: master
Choose a base branch
from

Conversation

aryaemami59
Copy link
Contributor

Overview

Previously the codegen tests would create side effects which made them unpredictable and caused them to produce inconsistent results. This PR mainly focuses on making the unit tests reliable both during local development and CI.

This PR:

  • Replaces the old cli command in cli.test.ts with a promisified version of Node's exec which mimicks the actual cli behavior more closely.
  • Enables importHelpers for a slightly smaller bundle size.
  • Revamps the tsconfig setup to have a tsconfig.build.json and tsconfig.json as opposed to a test/tsconfig.json with baseUrl.
  • Uses path aliasing to test against the output lib folder during CI. vite-tsconfig-paths was added to devDependencies to manage this easier.
  • Disables fileParallelism for unit tests in order to minimize side effects.
  • Creates a more comprehensive CI workflow for the codegen-openapi that tests against the final build artifact on different operating systems.

Copy link

codesandbox bot commented Mar 27, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@aryaemami59 aryaemami59 changed the title Fix codegen tests Fix codegen-openapi tests Mar 27, 2024
Copy link

netlify bot commented Mar 27, 2024

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit 4a33316
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/6642dc264bd41f00087e2e16
😎 Deploy Preview https://deploy-preview-4307--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codesandbox-ci bot commented Mar 27, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4a33316:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

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.

None yet

1 participant