mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 08:46:19 -04:00
swap ENVIRONMENT_IS_* functions for Utils named exports
This commit is contained in:
parent
c70f14419a
commit
1c24c05647
41 changed files with 117 additions and 141 deletions
|
@ -8,16 +8,6 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
// Define global environment functions
|
||||
global.ENVIRONMENT_IS_WORKER = function() {
|
||||
return typeof importScripts === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_NODE = function() {
|
||||
return typeof process === "object" && typeof require === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_WEB = function() {
|
||||
return typeof window === "object";
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function to convert a status to an icon.
|
||||
|
|
|
@ -15,17 +15,6 @@ import {
|
|||
logTestReport,
|
||||
} from "../lib/utils";
|
||||
|
||||
// Define global environment functions
|
||||
global.ENVIRONMENT_IS_WORKER = function() {
|
||||
return typeof importScripts === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_NODE = function() {
|
||||
return typeof process === "object" && typeof require === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_WEB = function() {
|
||||
return typeof window === "object";
|
||||
};
|
||||
|
||||
import TestRegister from "../lib/TestRegister";
|
||||
import "./tests/nodeApi";
|
||||
import "./tests/operations";
|
||||
|
|
|
@ -16,17 +16,6 @@ import {
|
|||
logTestReport,
|
||||
} from "../lib/utils";
|
||||
|
||||
// Define global environment functions
|
||||
global.ENVIRONMENT_IS_WORKER = function() {
|
||||
return typeof importScripts === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_NODE = function() {
|
||||
return typeof process === "object" && typeof require === "function";
|
||||
};
|
||||
global.ENVIRONMENT_IS_WEB = function() {
|
||||
return typeof window === "object";
|
||||
};
|
||||
|
||||
import TestRegister from "../lib/TestRegister";
|
||||
import "./tests/BCD";
|
||||
import "./tests/BSON";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue