Closed mille-nium closed 5 years ago
@nechaido if I move metaschema.load
and provider.open
to test.beforeEach
, there will be an async function (as I have to await metaschema.fs.load
) with callback, which looks a little bit weird, nevertheless it works. So should I do this?
test.beforeEach(async (test, callback) => {
let schema;
try {
schema = await metaschema.fs.load(schemasDir, options, config);
} catch (err) {
test.fail(err);
test.end();
return;
}
const provider = new StorageProvider({});
provider.open({ schema }, test.cbFail(() => callback({ provider })));
}
@mille-nium seems
@nechaido if I move metaschema.load and provider.open to test.beforeEach, there will be an async function (as I have to await metaschema.fs.load) with callback, which looks a little bit weird, nevertheless it works. So should I do this?
Seems fine.
Closes https://github.com/metarhia/globalstorage/issues/326