1.6.0 • Published 10 years ago

suddenly-testing v1.6.0

Weekly downloads
11
License
ISC
Repository
github
Last release
10 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

10 years ago

1.5.0

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago