Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Saver JSR

Save API responses for testing.

Usage

const httpSaver = new HttpSaver()

Deno.test('some API', () => {
    using _ = httpSaver.stubFetch()

    // First time the test runs, the response will be saved under `_fixtures/responses`
    // Subsequent test runs will use the saved response, without making a network request
    const res = await fetch('https://api.example.com')

    // ... do something with `res`
})

About

Save API responses for testing.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages