1.0.18 • Published 8 years ago

knex-mocker v1.0.18

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

knex-mocker

Mocks knex for testing purposes. Copies database tables from existing schema into a testing schema and allows the table to be seeded. Setup and teardown happens by making function calls. Currently only tested on mysql and postgres.

#API

import mock from 'knex-mocker';
import { knexDB } from './db';

mock(knexDB.client.config, (err, knex) => {
    if (err) throw err;
	knex.remove((err) => {
    });
});

.remove(callback) - removes mock database, extended from knex.

1.0.18

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago