Skip to content

[test-recorder] Support test context from vitest#28641

Closed
jeremymeng wants to merge 1 commit intoAzure:mainfrom
jeremymeng:recorder/vitest-context
Closed

[test-recorder] Support test context from vitest#28641
jeremymeng wants to merge 1 commit intoAzure:mainfrom
jeremymeng:recorder/vitest-context

Conversation

@jeremymeng
Copy link
Copy Markdown
Member

@jeremymeng jeremymeng commented Feb 22, 2024

This was merged previously as PR #28350 but reverted due to compilation error caused by packages missing @types/mocha dev dependency while tests are using Mocha types. Now that @types/mocha has been added to all packages that depends on mocha, this PR brings back the vitest support for test recorder.

Currently we just need suite title and test title to generate recording file names. vitest provides the info via context of the callback function.

This PR adds vitest support to recorder. Call site would look like

   //...
  beforeEach(async (context) => {
    recorder = new Recorder(context);

Currently we just need suite title and test title to generate recording
file names. `vitest` provides the info via `context` of the callback
function.

This PR adds vitest support to recorder. Call site would look like

```ts
   //...
  beforeEach(async (context) => {
    recorder = new Recorder(context);
```
@jeremymeng jeremymeng changed the title [test-recorder] Support test context from vitest (#28350) [test-recorder] Support test context from vitest Feb 22, 2024
@jeremymeng jeremymeng closed this Apr 10, 2024
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.

1 participant