# Integration Tests with Jest, Supertest, Knex, and Objection in TypeScript

DevFeed: [Integration Tests with Jest, Supertest, Knex, and Objection in TypeScript](<https://devfeed.tech/articles/integration-tests-with-jest-supertest-knex-and-objection-in-typescript-37595.md>)

Original publisher: [Read original article](<https://www.taniarascia.com/integration-testing-with-jest-typescript-objection/>)

Author: hello@taniarascia.com

Published: 2021-04-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tania Rascia](<https://devfeed.tech/sources/tania-rascia.md>)

Topics: [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Jest](<https://devfeed.tech/topics/jest.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [API](<https://devfeed.tech/topics/api.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Express](<https://devfeed.tech/topics/express.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [database-migration](<https://devfeed.tech/tags/database-migration.md>), [express](<https://devfeed.tech/tags/express.md>), [integration](<https://devfeed.tech/tags/integration.md>), [integration-test](<https://devfeed.tech/tags/integration-test.md>), [jest](<https://devfeed.tech/tags/jest.md>), [node](<https://devfeed.tech/tags/node.md>), [orm](<https://devfeed.tech/tags/orm.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

This article presents an approach to integration testing for a TypeScript Node/Express API using Jest, Supertest, Knex, and Objection.js. It covers test setup and teardown, database creation, migrations, seeding, real API calls, and successful and error responses.

## Source excerpt

Recently, I set up unit and integration tests for a Node API in TypeScript, and I couldn't find a lot of resources for setting up and...