Fix codegen-openapi tests
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:
- [X] Replaces the old
clicommand incli.test.tswith a promisified version of Node'sexecwhich mimicks the actual cli behavior more closely. - [X] Enables
importHelpersfor a slightly smaller bundle size. - [X] Revamps the
tsconfigsetup to have atsconfig.build.jsonandtsconfig.jsonas opposed to atest/tsconfig.jsonwithbaseUrl. - [X] Uses path aliasing to test against the output
libfolder during CI.vite-tsconfig-pathswas added todevDependenciesto manage this easier. - [X] Disables
fileParallelismfor unit tests in order to minimize side effects. - [X] Creates a more comprehensive CI workflow for the codegen-openapi that tests against the final build artifact on different operating systems.
Deploy Preview for redux-starter-kit-docs ready!
| Name | Link |
|---|---|
| Latest commit | 91aea9aa84d2277f46b9b858daa3929022108b14 |
| Latest deploy log | https://app.netlify.com/sites/redux-starter-kit-docs/deploys/66d20e8dbf2e42000932fe1a |
| Deploy Preview | https://deploy-preview-4307--redux-starter-kit-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
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 91aea9aa84d2277f46b9b858daa3929022108b14:
| Sandbox | Source |
|---|---|
| @examples-query-react/basic | Configuration |
| @examples-query-react/advanced | Configuration |
| @examples-action-listener/counter | Configuration |
| rtk-esm-cra | Configuration |
@aryaemami59 fyi the "ts/json/etc should be the same" test seems to be flaky - sometimes it can't find example.ts. Some kind of filesystem race condition, maybe?
Yup that's exactly what it is. I'll have to look into it later.