1.0.8 • Published 3 years ago
browser-store-test-data v1.0.8
Browser Store Test Data
A simple way to load test data into the browser store. Supports IndexedDB.
Essentially when developing, you provide a file with some test data. This test data is loaded into the browser store & ready before your application runs. Your application then runs & reads test data from the browser store.
Index
Installation
# Using npm, installing to local project (development)
npm i -D browser-store-test-data
Usage
The main intended method to use this in your project via webpack plugin.
Webpack Plugin Usage
// load the library & add to plugins section with otions. Specify test data file(s)
const BrowserStoreTestDataPlugin = require('browser-store-test-data')
plugins: [
new BrowserStoreTestDataPlugin(
{
browserDatabase: '[browser-database-name]',
testData: [
{
collectionName: 'collection-name',
dataFile: '.path/to/file/dir'
}
]
}
)
]
License
(Unlicense) See https://unlicense.org