memserver
Version:
in-memory database/ORM and http mock server you can run in-browser and node environments. Built for large frontend teams, fast tests and rapid prototyping
13 lines (11 loc) • 315 B
text/typescript
import Model, { resetMemory } from "@memserver/model";
export default function (hooks) {
hooks.beforeEach(function () {
// TODO: add here setup-dom logic in node.js
resetMemory(Model);
});
hooks.afterEach(function () {
this.Server ? this.Server.shutdown() : null;
resetMemory(Model);
});
}