We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9dbac2 commit deab3feCopy full SHA for deab3fe
langchain-core/src/documents/tests/document.test.ts
@@ -0,0 +1,15 @@
1
+import { describe, expect, test } from "@jest/globals";
2
+import { Document } from "../document.js";
3
+
4
+describe("Document", () => {
5
+ test("Constructing a document with an empty sting", async () => {
6
+ const doc = new Document({ pageContent: "" });
7
+ expect(doc.pageContent).toEqual("");
8
+ });
9
10
+ test("Constructing a document with an undefined at runtime", async () => {
11
+ const pageContent = undefined as unknown as string;
12
+ const doc = new Document({ pageContent });
13
14
15
+});
0 commit comments