svarog-ui-core
Version:
Core components of Svarog UI without themes
15 lines (13 loc) • 364 B
JavaScript
// src/utils/environment.js
/**
* Checks if the current environment is a test environment
* @returns {boolean} Whether the current environment is a test environment
*/
export const isTestEnvironment = () => {
return (
typeof vi !== 'undefined' ||
(typeof process !== 'undefined' &&
process.env &&
process.env.NODE_ENV === 'test')
);
};