1.6.0 • Published 7 years ago

suddenly-testing v1.6.0

Weekly downloads
11
License
ISC
Repository
github
Last release
7 years ago

Suddenly Testing

A few helpers for testing Suddenly apps.

Usage

const Testing = require('suddenly-testing');


// Truncates all non-migration tables
Testing.emptyDatabase(knex); // Assuming knex is an initialized Knex instance


// Mocks out a Redux store
Testing.mockStore(state);
// or
Testing.mockStore(Immutable.fromJS({
    is_loading: false,
    things: {}
}));


// Mocks out calls to `require` for images and css files
// so that React components can require them and not fail in tests
Testing.mockAssets();
Testing.unmockAssets();


// Get a UUID
Testing.uuid();
1.6.0

7 years ago

1.5.0

7 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago