Miss any of our Open RFC calls?Watch the recordings here! »

knex-timemachine

1.0.4 • Public • Published

knex-timemachine

Simple library for automatically rollbacking knex transactions at the end of an automated test.

Example usage:

let knexTimemachine = new (require('knex-timemachine'));

<...>

var oldKnex = daoObject.getKnex(); beforeEach(function (done) { knexTimemachine.startTransaction(done, oldKnex, [daoObject]); });

afterEach(function (done) { knexTimemachine.rollbackTransaction(done, oldKnex); });

Keywords

none

Install

npm i knex-timemachine

DownloadsWeekly Downloads

0

Version

1.0.4

License

none

Last publish

Collaborators

  • avatar