Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/bs / dist / scripts / jest / mockJestModule.js
Size: Mime:
// require('exotic')
require('@babel/polyfill');
// import 'babel-core/register'
// import 'babel-runtime/regenerator'
// try {
//   require('babel-polyfill')
// } catch (error) {
//   // can only have 1 instance
// }
if (global.expect === undefined) {
    // if (global.expect)
    global.eq = (a, b) => {
        expect(a).toEqual(b);
    };
    global.neq = (a, b) => {
        expect(a).not.toEqual(b);
    };
    // can use exotic here
    global.expect = (thing) => {
        // call if fn, otherwise return wrap
        return {
            toBe(x) {
                return true;
            },
            toBeGreaterThan(x) {
                return thing > x;
            },
            toBeGreaterThanOrEqual(x) {
                return thing > x;
            },
        };
    };
    global.it = global.test = global.describe = (name, fn) => {
        console.log(name);
        return fn();
    };
}
//# sourceMappingURL=mockJestModule.js.map