test (#4796)
This commit is contained in:
@@ -10,9 +10,9 @@ setupTestDatabase();
|
||||
describe("ImportMarkdownZipTask", () => {
|
||||
it("should import the documents, attachments", async () => {
|
||||
const fileOperation = await buildFileOperation();
|
||||
Object.defineProperty(fileOperation, "buffer", {
|
||||
Object.defineProperty(fileOperation, "stream", {
|
||||
get() {
|
||||
return fs.readFileSync(
|
||||
return fs.createReadStream(
|
||||
path.resolve(__dirname, "..", "..", "test", "fixtures", "outline.zip")
|
||||
);
|
||||
},
|
||||
@@ -33,9 +33,9 @@ describe("ImportMarkdownZipTask", () => {
|
||||
|
||||
it("should throw an error with corrupt zip", async () => {
|
||||
const fileOperation = await buildFileOperation();
|
||||
Object.defineProperty(fileOperation, "buffer", {
|
||||
Object.defineProperty(fileOperation, "stream", {
|
||||
get() {
|
||||
return fs.readFileSync(
|
||||
return fs.createReadStream(
|
||||
path.resolve(__dirname, "..", "..", "test", "fixtures", "corrupt.zip")
|
||||
);
|
||||
},
|
||||
@@ -59,9 +59,9 @@ describe("ImportMarkdownZipTask", () => {
|
||||
|
||||
it("should throw an error with empty collection in zip", async () => {
|
||||
const fileOperation = await buildFileOperation();
|
||||
Object.defineProperty(fileOperation, "buffer", {
|
||||
Object.defineProperty(fileOperation, "stream", {
|
||||
get() {
|
||||
return fs.readFileSync(
|
||||
return fs.createReadStream(
|
||||
path.resolve(__dirname, "..", "..", "test", "fixtures", "empty.zip")
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user