diff --git a/langchain-core/.eslintrc.cjs b/langchain-core/.eslintrc.cjs index 4adf489ade1c..2d66a327d17b 100644 --- a/langchain-core/.eslintrc.cjs +++ b/langchain-core/.eslintrc.cjs @@ -11,7 +11,7 @@ module.exports = { project: "./tsconfig.json", sourceType: "module", }, - plugins: ["@typescript-eslint", "no-instanceof"], + plugins: ["@typescript-eslint", "no-instanceof", "eslint-plugin-jest"], ignorePatterns: [ "src/utils/@cfworker", "src/utils/fast-json-patch", @@ -65,5 +65,6 @@ module.exports = { "no-lonely-if": 0, "prefer-rest-params": 0, "new-cap": ["error", { properties: false, capIsNew: false }], + 'jest/no-focused-tests': 'error', }, }; diff --git a/langchain-core/package.json b/langchain-core/package.json index 45ee433c91e0..97a1a9082495 100644 --- a/langchain-core/package.json +++ b/langchain-core/package.json @@ -51,6 +51,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jest": "^27.6.0", "eslint-plugin-no-instanceof": "^1.0.1", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.5.0", diff --git a/langchain/.eslintrc.cjs b/langchain/.eslintrc.cjs index bab396aedde2..efa72569f323 100644 --- a/langchain/.eslintrc.cjs +++ b/langchain/.eslintrc.cjs @@ -11,7 +11,7 @@ module.exports = { project: "./tsconfig.json", sourceType: "module", }, - plugins: ["@typescript-eslint", "no-instanceof"], + plugins: ["@typescript-eslint", "no-instanceof", "eslint-plugin-jest"], ignorePatterns: [ "src/util/@cfworker", "src/util/fast-json-patch", @@ -65,5 +65,6 @@ module.exports = { "no-lonely-if": 0, "prefer-rest-params": 0, "new-cap": ["error", { properties: false, capIsNew: false }], + 'jest/no-focused-tests': 'error', }, }; diff --git a/langchain/package.json b/langchain/package.json index 5194d640e0b8..8245271f1741 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -927,6 +927,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jest": "^27.6.0", "eslint-plugin-no-instanceof": "^1.0.1", "eslint-plugin-prettier": "^4.2.1", "faiss-node": "^0.5.1", diff --git a/langchain/src/document_loaders/tests/gitbook.int.test.ts b/langchain/src/document_loaders/tests/gitbook.int.test.ts index 8b72dac06f64..04e8b3f26f2f 100644 --- a/langchain/src/document_loaders/tests/gitbook.int.test.ts +++ b/langchain/src/document_loaders/tests/gitbook.int.test.ts @@ -10,7 +10,7 @@ test("Test GitbookLoader", async () => { console.log("Loaded", docs.length, "Gitbook documents"); }); -test.only("Test GitbookLoader with shouldLoadAllPaths", async () => { +test("Test GitbookLoader with shouldLoadAllPaths", async () => { const loader = new GitbookLoader("https://docs.maildrop.cc", { shouldLoadAllPaths: true, }); diff --git a/libs/langchain-anthropic/.eslintrc.cjs b/libs/langchain-anthropic/.eslintrc.cjs index 4adf489ade1c..2d66a327d17b 100644 --- a/libs/langchain-anthropic/.eslintrc.cjs +++ b/libs/langchain-anthropic/.eslintrc.cjs @@ -11,7 +11,7 @@ module.exports = { project: "./tsconfig.json", sourceType: "module", }, - plugins: ["@typescript-eslint", "no-instanceof"], + plugins: ["@typescript-eslint", "no-instanceof", "eslint-plugin-jest"], ignorePatterns: [ "src/utils/@cfworker", "src/utils/fast-json-patch", @@ -65,5 +65,6 @@ module.exports = { "no-lonely-if": 0, "prefer-rest-params": 0, "new-cap": ["error", { properties: false, capIsNew: false }], + 'jest/no-focused-tests': 'error', }, }; diff --git a/libs/langchain-anthropic/package.json b/libs/langchain-anthropic/package.json index 3dee717d9b20..eaaba4dcbcac 100644 --- a/libs/langchain-anthropic/package.json +++ b/libs/langchain-anthropic/package.json @@ -45,6 +45,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jest": "^27.6.0", "eslint-plugin-no-instanceof": "^1.0.1", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.5.0", diff --git a/libs/langchain-openai/.eslintrc.cjs b/libs/langchain-openai/.eslintrc.cjs index 4adf489ade1c..2d66a327d17b 100644 --- a/libs/langchain-openai/.eslintrc.cjs +++ b/libs/langchain-openai/.eslintrc.cjs @@ -11,7 +11,7 @@ module.exports = { project: "./tsconfig.json", sourceType: "module", }, - plugins: ["@typescript-eslint", "no-instanceof"], + plugins: ["@typescript-eslint", "no-instanceof", "eslint-plugin-jest"], ignorePatterns: [ "src/utils/@cfworker", "src/utils/fast-json-patch", @@ -65,5 +65,6 @@ module.exports = { "no-lonely-if": 0, "prefer-rest-params": 0, "new-cap": ["error", { properties: false, capIsNew: false }], + 'jest/no-focused-tests': 'error', }, }; diff --git a/libs/langchain-openai/package.json b/libs/langchain-openai/package.json index 3f348059ec94..0f9a811a068e 100644 --- a/libs/langchain-openai/package.json +++ b/libs/langchain-openai/package.json @@ -47,6 +47,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jest": "^27.6.0", "eslint-plugin-no-instanceof": "^1.0.1", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.5.0", diff --git a/yarn.lock b/yarn.lock index 7814498c3bb2..495765f84681 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7970,6 +7970,7 @@ __metadata: eslint-config-airbnb-base: ^15.0.0 eslint-config-prettier: ^8.6.0 eslint-plugin-import: ^2.27.5 + eslint-plugin-jest: ^27.6.0 eslint-plugin-no-instanceof: ^1.0.1 eslint-plugin-prettier: ^4.2.1 jest: ^29.5.0 @@ -7996,6 +7997,7 @@ __metadata: eslint-config-airbnb-base: ^15.0.0 eslint-config-prettier: ^8.6.0 eslint-plugin-import: ^2.27.5 + eslint-plugin-jest: ^27.6.0 eslint-plugin-no-instanceof: ^1.0.1 eslint-plugin-prettier: ^4.2.1 jest: ^29.5.0 @@ -8026,6 +8028,7 @@ __metadata: eslint-config-airbnb-base: ^15.0.0 eslint-config-prettier: ^8.6.0 eslint-plugin-import: ^2.27.5 + eslint-plugin-jest: ^27.6.0 eslint-plugin-no-instanceof: ^1.0.1 eslint-plugin-prettier: ^4.2.1 jest: ^29.5.0 @@ -12150,6 +12153,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/scope-manager@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + checksum: 6062d6b797fe1ce4d275bb0d17204c827494af59b5eaf09d8a78cdd39dadddb31074dded4297aaf5d0f839016d601032857698b0e4516c86a41207de606e9573 + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:6.9.1": version: 6.9.1 resolution: "@typescript-eslint/scope-manager@npm:6.9.1" @@ -12208,6 +12221,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 48c87117383d1864766486f24de34086155532b070f6264e09d0e6139449270f8a9559cfef3c56d16e3bcfb52d83d42105d61b36743626399c7c2b5e0ac3b670 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:6.9.1": version: 6.9.1 resolution: "@typescript-eslint/types@npm:6.9.1" @@ -12251,6 +12271,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/visitor-keys": 5.62.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 3624520abb5807ed8f57b1197e61c7b1ed770c56dfcaca66372d584ff50175225798bccb701f7ef129d62c5989070e1ee3a0aa2d84e56d9524dcf011a2bb1a52 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:6.9.1": version: 6.9.1 resolution: "@typescript-eslint/typescript-estree@npm:6.9.1" @@ -12305,6 +12343,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^5.10.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" + dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.62.0 + "@typescript-eslint/types": 5.62.0 + "@typescript-eslint/typescript-estree": 5.62.0 + eslint-scope: ^5.1.1 + semver: ^7.3.7 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: ee9398c8c5db6d1da09463ca7bf36ed134361e20131ea354b2da16a5fdb6df9ba70c62a388d19f6eebb421af1786dbbd79ba95ddd6ab287324fc171c3e28d931 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.54.1": version: 5.54.1 resolution: "@typescript-eslint/visitor-keys@npm:5.54.1" @@ -12325,6 +12381,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" + dependencies: + "@typescript-eslint/types": 5.62.0 + eslint-visitor-keys: ^3.3.0 + checksum: 976b05d103fe8335bef5c93ad3f76d781e3ce50329c0243ee0f00c0fcfb186c81df50e64bfdd34970148113f8ade90887f53e3c4938183afba830b4ba8e30a35 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:6.9.1": version: 6.9.1 resolution: "@typescript-eslint/visitor-keys@npm:6.9.1" @@ -17280,6 +17346,24 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-jest@npm:^27.6.0": + version: 27.6.0 + resolution: "eslint-plugin-jest@npm:27.6.0" + dependencies: + "@typescript-eslint/utils": ^5.10.0 + peerDependencies: + "@typescript-eslint/eslint-plugin": ^5.0.0 || ^6.0.0 + eslint: ^7.0.0 || ^8.0.0 + jest: "*" + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 4c42641f9bf2d597761637028083e20b9f81762308e98baae40eb805d3e81ff8d837f06f4f0c1a2fd249e2be2fb24d33b7aafeaa8942de805c2b8d7c3b6fc4e4 + languageName: node + linkType: hard + "eslint-plugin-jsx-a11y@npm:^6.6.0": version: 6.7.1 resolution: "eslint-plugin-jsx-a11y@npm:6.7.1" @@ -22397,6 +22481,7 @@ __metadata: eslint-config-airbnb-base: ^15.0.0 eslint-config-prettier: ^8.6.0 eslint-plugin-import: ^2.27.5 + eslint-plugin-jest: ^27.6.0 eslint-plugin-no-instanceof: ^1.0.1 eslint-plugin-prettier: ^4.2.1 expr-eval: ^2.0.2