@metamask/snaps-jest
Version:
A Jest preset for end-to-end testing MetaMask Snaps, including a Jest environment, and a set of Jest matchers
18 lines • 674 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnvironment = void 0;
const utils_1 = require("@metamask/utils");
/**
* Get the Snaps environment. This asserts that the environment has been
* configured.
*
* @returns The Snaps environment.
*/
function getEnvironment() {
// `snapsEnvironment` is a global variable that is set by the Jest
// environment.
(0, utils_1.assert)(typeof snapsEnvironment !== 'undefined', 'Snaps environment not found. Make sure you have configured the environment correctly.');
return snapsEnvironment;
}
exports.getEnvironment = getEnvironment;
//# sourceMappingURL=environment.cjs.map