Integration Tests

Pro Feature

This feature is only available on paid plans. Please schedule a demo or email us to get started.

To make sure that your SDK works in production, Fern will auto-generate integration tests that run before release. The release will only take place if no tests fail.

What gets generated?

Adding additional tests

If you would like to add additional tests, you can do so by committing them directly to the generated SDK repositories. Note that you will need to add the test files to your .fernignore file to prevent them from being overwritten by Fern.

1

Create tests/custom.test.ts

1 import { MyClient } from '../src';
2
3 describe('MyClient', () => {
4 it('should do something', async () => {
5 const client = new MyClient();
6 const response = await client.resource.get();
7 expect(response).toEqual({ something: 'something' });
8 });
9 });
2

Run your test

$yarn install
>yarn test tests/custom.test.ts
3

.fernignore your test file

1# Specify any files that shouldn't be modified by Fern
2
3tests/custom.test.ts