-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
} |
There was a problem hiding this comment.
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!