Skip to content

Commit 87ce560

Browse files
authored
fix(ci): Fix esbuild tests (#6739)
1 parent a8ff65d commit 87ce560

File tree

5 files changed

+0
-33
lines changed

5 files changed

+0
-33
lines changed

environment_tests/test-exports-esbuild/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@langchain/core": "workspace:*",
2525
"@langchain/openai": "workspace:*",
2626
"@tsconfig/recommended": "^1.0.2",
27-
"d3-dsv": "2",
2827
"esbuild": "^0.17.18",
2928
"hnswlib-node": "^3.0.0",
3029
"langchain": "workspace:*",

environment_tests/test-exports-esbuild/src/import.cjs

-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ async function test() {
66
const { HNSWLib } = await import("@langchain/community/vectorstores/hnswlib");
77
const { OpenAIEmbeddings } = await import("@langchain/openai");
88
const { Document } = await import("@langchain/core/documents");
9-
const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv");
109

1110
// Test exports
1211
assert(typeof OpenAI === "function");
@@ -39,13 +38,6 @@ async function test() {
3938
);
4039

4140
assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);
42-
43-
// Test CSVLoader
44-
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));
45-
46-
const docs = await loader.load();
47-
48-
assert(docs.length === 2);
4941
}
5042

5143
test()

environment_tests/test-exports-esbuild/src/index.js

-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
55
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
66
import { OpenAIEmbeddings } from "@langchain/openai";
77
import { Document } from "@langchain/core/documents";
8-
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";
98
import { CallbackManager } from "@langchain/core/callbacks/manager";
109

1110
// Test exports
@@ -41,10 +40,3 @@ await vs.addVectors(
4140
);
4241

4342
assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);
44-
45-
// Test CSVLoader
46-
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));
47-
48-
const docs = await loader.load();
49-
50-
assert(docs.length === 2);

environment_tests/test-exports-esbuild/src/require.cjs

-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts");
55
const { HNSWLib } = require("@langchain/community/vectorstores/hnswlib");
66
const { OpenAIEmbeddings } = require("@langchain/openai");
77
const { Document } = require("@langchain/core/documents");
8-
const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv");
98

109
async function test() {
1110
// Test exports
@@ -39,13 +38,6 @@ async function test() {
3938
);
4039

4140
assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);
42-
43-
// Test CSVLoader
44-
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));
45-
46-
const docs = await loader.load();
47-
48-
assert(docs.length === 2);
4941
}
5042

5143
test()

environment_tests/test-exports-esbuild/src/typescript.ts

-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
55
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
66
import { OpenAIEmbeddings } from "@langchain/openai";
77
import { Document } from "@langchain/core/documents";
8-
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";
98

109
async function test(useAzure: boolean = false) {
1110
// Test exports
@@ -49,13 +48,6 @@ async function test(useAzure: boolean = false) {
4948
);
5049

5150
assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);
52-
53-
// Test CSVLoader
54-
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));
55-
56-
const docs = await loader.load();
57-
58-
assert(docs.length === 2);
5951
}
6052

6153
test(false)

0 commit comments

Comments
 (0)