mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-05-06 20:29:12 -05:00
server-esm: Fix use of __dirname
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user