server-esm: Fix use of __dirname

This commit is contained in:
Elian Doran
2024-07-19 00:18:35 +03:00
parent 27c296fa6c
commit b6c5880484
10 changed files with 57 additions and 14 deletions
+4 -1
View File
@@ -1,12 +1,15 @@
import etapi from "../support/etapi.js";
import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
etapi.describeEtapi("import", () => {
// temporarily skip this test since test-export.zip is missing
xit("import", async () => {
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
const zipFileBuffer = fs.readFileSync(
path.resolve(__dirname, "test-export.zip")
path.resolve(scriptDir, "test-export.zip")
);
const response = await etapi.postEtapiContent(