https://github.com/dlenroc/vitest-serenity-js
A module that integrates Serenity/JS with Vitest testing framework.
https://github.com/dlenroc/vitest-serenity-js
Last synced: 10 months ago
JSON representation
A module that integrates Serenity/JS with Vitest testing framework.
- Host: GitHub
- URL: https://github.com/dlenroc/vitest-serenity-js
- Owner: dlenroc
- Created: 2025-01-21T21:20:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T17:52:44.000Z (over 1 year ago)
- Last Synced: 2025-03-25T10:01:56.087Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serenity/JS Vitest
A module that integrates [Serenity/JS](https://serenity-js.org/) with
[Vitest](https://vitest.dev/) testing framework.
## Installation
```sh
npm install -D @dlenroc/vitest-serenity-js
```
## Usage
Add `"@dlenroc/vitest-serenity-js/setup"` to `setupFiles` and configure as
needed.
```ts
import type {} from '@dlenroc/vitest-serenity-js/setup';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
setupFiles: ['@dlenroc/vitest-serenity-js/setup'],
provide: {
serenity: {
crew: [
'@serenity-js/serenity-bdd',
[
'@serenity-js/core:ArtifactArchiver',
{ outputDirectory: './target/site/serenity' },
],
],
},
},
},
});
```
Check out the [ProvidedContext](./src/setup.d.ts) for all available Serenity/JS
configuration options and the [TestContext](./src/setup.d.ts) for information
about injected fixtures.