Skip to content

Commit f4f3aa3

Browse files
committed
Update TestUtils.js
1 parent 9f4f7b4 commit f4f3aa3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/TestUtils.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import AppCache from './cache';
2-
2+
import SchemaCache from './Adapters/Cache/SchemaCache';
33
/**
44
* Destroys all data in the database
55
* @param {boolean} fast set to true if it's ok to just drop objects and not indexes.
@@ -13,8 +13,10 @@ export function destroyAllDataPermanently(fast) {
1313
const app = AppCache.get(appId);
1414
if (app.databaseController) {
1515
return app.databaseController.deleteEverything(fast);
16+
} else if (app.databaseAdapter) {
17+
SchemaCache.clear();
18+
return app.databaseAdapter.deleteAllClasses(fast);
1619
} else {
17-
console.log('Could not delete: ', app.databaseAdapter);
1820
return Promise.resolve();
1921
}
2022
})

0 commit comments

Comments
 (0)