Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

README.md 822 B

You have to be logged in to leave a comment. Sign In

jest-integration (Prompt Testing with Jest and Vitest)

You can run this example with:

npx promptfoo@latest init --example jest-integration

This folder contains a small example of how to test LLM prompts using Jest, Vitest, and promptfoo.

Getting Started

To get started, follow these steps:

  1. Install the dependencies:

    npm install
    
  2. 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.

Testing prompts with Jest

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...