| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR introduces a makeMacro helper in src/testing-utils.ts to wrap AVA test.macro in a way that preserves stronger argument typing at call sites, and then migrates several existing test macros to use the new wrapper-style invocation.
Changes:
| File | Description |
|---|---|
| src/testing-utils.ts | Adds makeMacro helper and adjusts setupTests parameter naming. |
| src/upload-sarif.test.ts | Migrates a macro + serial tests to makeMacro wrapper usage. |
| src/status-report.test.ts | Migrates a macro + serial tests to makeMacro wrapper usage. |
| src/start-proxy.test.ts | Migrates several macros/tests to wrapper-style invocation (.serial() / direct call). |
| src/setup-codeql.test.ts | Migrates a macro + serial tests to makeMacro wrapper usage. |
| src/overlay/caching.test.ts | Migrates a macro + serial tests to makeMacro wrapper usage. |
| src/init.test.ts | Migrates a macro + tests to wrapper-style invocation (direct call). |
| src/init-action-post-helper.test.ts | Migrates a macro + serial tests to makeMacro wrapper usage. |
| src/diff-informed-analysis-utils.test.ts | Migrates a macro + serial tests to makeMacro wrapper usage. |
| src/config/db-config.test.ts | Migrates multiple macros/tests and updates internal macro composition to use .fn. |
| src/config-utils.test.ts | Migrates a macro + many serial tests to makeMacro wrapper usage. |
| src/codeql.test.ts | Migrates a macro + many serial tests to makeMacro wrapper usage. |
| .vscode/tests.code-snippets | Updates the “Test Macro” snippet to use makeMacro. |
Sorry, something went wrong.
There was a problem hiding this comment.
Very nice!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When defining a test macro using test.macro, the argument types are not strongly enforced when the macro is used with test, test.serial, etc.
This PR adds a makeMacro helper which returns a wrapper around a macro that enforces the argument types.
Replaces #3873.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist