Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no focused jest tests eslint rule #3422

Merged
merged 4 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion langchain-core/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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',
},
};
1 change: 1 addition & 0 deletions langchain-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"eslint-config-airbnb-base": "^15.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the PR! This comment is just to flag the addition of a new dev dependency ("eslint-plugin-jest") for maintainers to review.

"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",
Expand Down
3 changes: 2 additions & 1 deletion langchain/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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',
},
};
1 change: 1 addition & 0 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion langchain/src/document_loaders/tests/gitbook.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
3 changes: 2 additions & 1 deletion libs/langchain-anthropic/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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',
},
};
1 change: 1 addition & 0 deletions libs/langchain-anthropic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion libs/langchain-openai/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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',
},
};
1 change: 1 addition & 0 deletions libs/langchain-openai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"eslint-config-airbnb-base": "^15.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the PR! I noticed that this change adds a new dev dependency, "eslint-plugin-jest". This comment is just to flag the dependency change for maintainers to review.

"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",
Expand Down
85 changes: 85 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down