diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 51ab37d155e4..438784aa9b12 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -14,8 +14,7 @@ "jest-matcher-utils": "^20.0.3", "jest-matchers": "^20.0.3", "jest-message-util": "^20.0.3", - "jest-snapshot": "^20.0.3", - "p-map": "^1.1.1" + "jest-snapshot": "^20.0.3" }, "devDependencies": { "jest-runtime": "^20.0.4" diff --git a/packages/jest-jasmine2/src/index.js b/packages/jest-jasmine2/src/index.js index c0432a1f2f28..a0c40aee2a73 100644 --- a/packages/jest-jasmine2/src/index.js +++ b/packages/jest-jasmine2/src/index.js @@ -33,7 +33,7 @@ async function jasmine2( environment, testPath, ); - const jasmineFactory = require(JASMINE); + const jasmineFactory = runtime.requireInternalModule(JASMINE); const jasmine = jasmineFactory.create(); const env = jasmine.getEnv(); diff --git a/packages/jest-jasmine2/src/queueRunner.js b/packages/jest-jasmine2/src/queueRunner.js index 6e4c64e30edd..893389bb3b9e 100644 --- a/packages/jest-jasmine2/src/queueRunner.js +++ b/packages/jest-jasmine2/src/queueRunner.js @@ -8,7 +8,6 @@ * @flow */ -import pMap from 'p-map'; import pTimeout from './p-timeout'; type Options = { @@ -57,7 +56,11 @@ async function queueRunner(options: Options) { }, ); }; - return pMap(options.queueableFns, mapper, {concurrency: 1}); + + return options.queueableFns.reduce( + (promise, fn) => promise.then(() => mapper(fn)), + Promise.resolve(), + ); } module.exports = queueRunner;