3.0.7 • Published 3 years ago
jest-environment-knex v3.0.7
jest-environment-knex
Tested against SQlite3 and Postgres. See __tests__
Install
$ npm install --save-dev jest-environment-knex
# or
$ yarn -D jest-environment-knex
Usage
const { knex } = global;
beforeAll(async () => {
await knex.migrate.latest();
await knex.seed.run();
});
test("should list all tables", async () => {
const query = `
SELECT table_name FROM information_schema.tables
WHERE table_schema = current_schema() AND table_catalog = ?
`;
const results = await knex.raw(query, [knex.client.database()]);
expect(results.rows.map((row) => row.table_name).sort()).toMatchSnapshot();
});
Release policy
Releases are automaticly made through our GitHub Actions strictly following the Semantic Versioning specification thanks to semantic-release.
3.0.7
3 years ago
3.0.6
4 years ago
3.0.5
4 years ago
3.0.4
4 years ago
3.0.3
4 years ago
3.0.2
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.0.0
4 years ago
1.1.14
4 years ago
1.1.13
4 years ago
1.1.11
4 years ago
1.1.9
4 years ago
1.1.7
4 years ago
1.1.6
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.3
5 years ago
1.0.0
5 years ago