UNPKG

kuzzle-sdk

Version:
34 lines 903 B
"use strict"; /* eslint-disable no-invalid-this */ Object.defineProperty(exports, "__esModule", { value: true }); const cucumber_1 = require("@cucumber/cucumber"); (0, cucumber_1.Before)(async function () { await clean(this); }); (0, cucumber_1.BeforeAll)(function () { const world = this; world.index = null; world.collection = null; world.ids = []; world.user = null; world.jwt = null; world.content = null; world.error = null; world.notifications = []; }); async function clean(world) { try { await world.kuzzle.connect(); await world.kuzzle.query({ controller: "admin", action: "resetDatabase", }); } catch (error) { // rethrow to get a readable error // eslint-disable-next-line no-console console.error(error); throw error; } } //# sourceMappingURL=hooks.js.map