* Move helper.clearData to DatabaseAdapter. Expose DatabaseAdapter in index * fix indentation * Export DatabaseAdapter in index.js * Rename clearData to destroyAllDataPermanently. Only export destroyAllDataPermanently from DatabaseAdapter. Update helper * Expose wrapped TestUtils from index.js. TestUtils exposed select functions from other modules, only in test environment
16 lines
395 B
JavaScript
16 lines
395 B
JavaScript
import { destroyAllDataPermanently } from './DatabaseAdapter';
|
|
|
|
let unsupported = function() {
|
|
throw 'Only supported in test environment';
|
|
};
|
|
|
|
let _destroyAllDataPermanently;
|
|
if (process.env.TESTING) {
|
|
_destroyAllDataPermanently = destroyAllDataPermanently;
|
|
} else {
|
|
_destroyAllDataPermanently = unsupported;
|
|
}
|
|
|
|
export default {
|
|
destroyAllDataPermanently: _destroyAllDataPermanently};
|