Skip to content

Commit 50f9122

Browse files
chore: more tests for exportsManager
1 parent 4fb1bbd commit 50f9122

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/unit/common/exportsManager.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,22 @@ describe("ExportsManager unit test", () => {
230230
).toThrow();
231231
});
232232

233+
it("should throw if the same name export is requested more than once", () => {
234+
const { cursor } = createDummyFindCursorWithDelay([{ name: 1 }, { name: 2 }], 100);
235+
manager.createJSONExport({
236+
input: cursor,
237+
exportName,
238+
jsonExportFormat: "relaxed",
239+
});
240+
expect(() =>
241+
manager.createJSONExport({
242+
input: cursor,
243+
exportName,
244+
jsonExportFormat: "relaxed",
245+
})
246+
).toThrow();
247+
});
248+
233249
describe("when cursor is empty", () => {
234250
it("should create an empty export", async () => {
235251
const { cursor, cursorCloseNotification } = createDummyFindCursor([]);

0 commit comments

Comments
 (0)