integration-jest (Prompt Testing with Jest and Vitest)
You can run this example with:
Content
integration-jest (Prompt Testing with Jest and Vitest)
You can run this example with:
npx promptfoo@latest init --example integration-jest
cd integration-jest
This folder contains a small example of how to test LLM prompts using Jest, Vitest, and promptfoo.
Getting Started
Use a supported Node.js version for Promptfoo and Vitest 5.
To get started, follow these steps:
- Install the dependencies:
npm install
- Run the tests:
To run the tests with Jest:
npx jest
Or, to run the tests with Vitest:
npx vitest
Additional Information
For more details on integrating prompt testing with Jest and Vitest, see the documentation.
Source and license
- Source
- Promptfoo
- Original
- promptfoo/promptfoo/examples/integration-jest
- License
- MIT