data_is-jest-test.js

/**
 * @module isJestTest
 * @description Determines if the current process is being run by Jest.
 *
 * @since 1.0.0
 *
 * @return {boolean} Returns true if the current process is being run by Jest. Returns false otherwise.
 *
 * @example
 * import { isJestTest } from "@gravityforms/utils";
 *
 * function Example() {
 *   const isJestTestRunning = isJestTest();
 * }
 *
 */
export default function isJestTest() {
	return !! window.__TEST__;
}