From b01190d537cd355c63dabd801045414fb0f159e2 Mon Sep 17 00:00:00 2001 From: Dimitri Kopriwa Date: Fri, 1 Feb 2019 01:13:28 +0700 Subject: [PATCH] fix(polyfill): Not using default export --- package.json | 2 +- src/index.js | 2 +- src/tests/index.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 284502a..d19de0b 100644 --- a/package.json +++ b/package.json @@ -339,4 +339,4 @@ ] }, "contributors": [] -} \ No newline at end of file +} diff --git a/src/index.js b/src/index.js index ddd234e..430fca6 100644 --- a/src/index.js +++ b/src/index.js @@ -25,7 +25,7 @@ const defaultOptions = { * // if you need fetch for node within test, just activate it * require('@yeutech-lab/test-polyfill').polyfill({ isomorphicFetch: true }) */ -export default function polyfill(options) { +export function polyfill(options) { const opts = { ...defaultOptions, ...options }; if (opts.isomorphicFetch) { const Tough = require('tough-cookie'); diff --git a/src/tests/index.test.js b/src/tests/index.test.js index 9d44d7a..e3638aa 100644 --- a/src/tests/index.test.js +++ b/src/tests/index.test.js @@ -1,4 +1,4 @@ -import polyfill from '../index'; +import { polyfill } from '../index'; describe('polyfill', () => { it('should polyfill fetch-mock', (done) => {