Skip to content

Commit

Permalink
move jasmine back to inner scope / don't use iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronabramov committed Jun 22, 2017
1 parent 95c774f commit fd46ea1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/jest-jasmine2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-jasmine2/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 5 additions & 2 deletions packages/jest-jasmine2/src/queueRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* @flow
*/

import pMap from 'p-map';
import pTimeout from './p-timeout';

type Options = {
Expand Down Expand Up @@ -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;

0 comments on commit fd46ea1

Please sign in to comment.