@renoxium/sdk 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/test.js +7 -3
  2. package/package.json +1 -1
package/dist/test.js CHANGED
@@ -201,7 +201,13 @@ export async function app(options = {}) {
201
201
  const h = await harness();
202
202
  const s = await spec(h, options.project ?? process.env.RENOX_TEST_PROJECT ?? process.cwd());
203
203
  const w = await h.startTestWorker(s);
204
- afterAll(() => w.stop());
204
+ const sqlite = new Database(w.db, { readonly: true });
205
+ // The database is closed before the worker's folder is removed: on Windows
206
+ // an open file cannot be deleted (EBUSY in `stop`).
207
+ afterAll(async () => {
208
+ sqlite.close();
209
+ await w.stop();
210
+ });
205
211
  const jars = new Map();
206
212
  const jarOf = (user) => {
207
213
  let j = jars.get(user);
@@ -211,8 +217,6 @@ export async function app(options = {}) {
211
217
  }
212
218
  return j;
213
219
  };
214
- const sqlite = new Database(w.db, { readonly: true });
215
- afterAll(() => sqlite.close());
216
220
  const make = (user) => {
217
221
  const send = async (method, path, init = {}) => {
218
222
  const jar = jarOf(user);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renoxium/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Types and helpers for Renox tenant code: ctx (db, fetch, secrets, log, deadline), handlers, pages, modules, errors, test fakes",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/arif-rachim/renox.rs/tree/main/sdk",