* Pull api-* packages into lerna repo * Bootstrap with hoist * Update jest alias config * Add api-jsonrpc * Pull in jsonrpc * Update badges * Don't hoist, use workspaces * .eslintrc to root * Cleanups, build from root * Shorthand commands * Update to @polkadot/dev 0.9.1 * Update description
25 lines
494 B
JavaScript
25 lines
494 B
JavaScript
// ISC, Copyright 2017 Jaco Greeff
|
|
|
|
describe('http/polyfill', () => {
|
|
let origFetch;
|
|
|
|
beforeEach(() => {
|
|
origFetch = global.fetch;
|
|
global.fetch = null;
|
|
});
|
|
|
|
afterEach(() => {
|
|
global.fetch = origFetch;
|
|
});
|
|
|
|
it('polyfills with no exceptions (without fetch)', () => {
|
|
expect(require('./polyfill')).toBeDefined();
|
|
});
|
|
|
|
it('polyfills with no exceptions (with fetch)', () => {
|
|
global.fetch = () => true;
|
|
|
|
expect(require('./polyfill')).toBeDefined();
|
|
});
|
|
});
|