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

all[minor]: Add ability to disable console logs in tests #6009

Merged
merged 1 commit into from
Jul 9, 2024
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the DISABLE_CONSOLE_LOGS environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-anthropic/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! 👋 I noticed that the recent change in jest-setup-after-env.js adds code to access an environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-aws/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds code to access an environment variable using process.env. This is flagged for your review. Let me know if you need further assistance with this.

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the DISABLE_CONSOLE_LOGS environment variable. This is flagged for your review to ensure it aligns with our environment variable usage guidelines. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-azure-openai/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey team, just wanted to flag the recent change in jest-setup-after-env.js that accesses the environment variable DISABLE_CONSOLE_LOGS using process.env. This is flagged for your review to ensure it aligns with our environment variable usage guidelines. Great work overall!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-baidu-qianfan/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I've reviewed the code and noticed that the recent change in jest-setup-after-env.js adds logic to access an environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Let me know if you need further assistance with this.

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-cloudflare/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the environment variable DISABLE_CONSOLE_LOGS using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-cohere/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent code change in jest-setup-after-env.js is accessing and reading the value of the environment variable DISABLE_CONSOLE_LOGS. I've flagged this for your review to ensure it aligns with the project's standards. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-community/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the DISABLE_CONSOLE_LOGS environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-exa/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds code to access an environment variable using process.env. This comment is just to flag this change for the maintainers to review. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-google-genai/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I've reviewed the PR and noticed that the added code explicitly accesses an environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Let me know if you need further assistance with this.

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-groq/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the DISABLE_CONSOLE_LOGS environment variable. This comment is to flag the change for your review. Let me know if you need further assistance with this.

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-mistralai/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds code to conditionally disable console.log based on the value of the environment variable DISABLE_CONSOLE_LOGS. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-mixedbread-ai/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds code to access an environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-mongodb/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the DISABLE_CONSOLE_LOGS environment variable using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-nomic/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent PR includes a change that accesses an environment variable using process.env. This comment is just to flag this change for the maintainers to review. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-pinecone/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the environment variable DISABLE_CONSOLE_LOGS. I've flagged this for your review, just to ensure it aligns with our environment variable usage. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-qdrant/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! 👋 I noticed that the recent change in jest-setup-after-env.js is flagging the access of the environment variable DISABLE_CONSOLE_LOGS for review. This is to ensure that the handling of environment variables aligns with best practices. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-redis/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey team, I've reviewed the PR and noticed that the added code explicitly accesses an environment variable using process.env. This comment is to flag the change for maintainers to review the use of the environment variable. Great work overall!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-standard-tests/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the environment variable DISABLE_CONSOLE_LOGS using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-textsplitters/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds logic to access the environment variable DISABLE_CONSOLE_LOGS. This comment is to flag the change for maintainers to review the use of environment variables in the code. Great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
6 changes: 6 additions & 0 deletions libs/langchain-weaviate/scripts/jest-setup-after-env.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that the recent change in jest-setup-after-env.js adds a check for the environment variable DISABLE_CONSOLE_LOGS using process.env. I've flagged this for your review to ensure it aligns with our environment variable usage. Keep up the great work!

import { afterAll, jest } from "@jest/globals";

afterAll(awaitAllCallbacks);

// Allow console.log to be disabled in tests
if (process.env.DISABLE_CONSOLE_LOGS === "true") {
console.log = jest.fn();
}
Loading