diff --git a/e2e/__tests__/jasmineAsync.test.ts b/e2e/__tests__/jasmineAsync.test.ts index c066d90fc8cb..c54876f24c34 100644 --- a/e2e/__tests__/jasmineAsync.test.ts +++ b/e2e/__tests__/jasmineAsync.test.ts @@ -117,10 +117,20 @@ describe('async jasmine', () => { it('works with concurrent.each', () => { const {json} = runWithJson('jasmine-async', ['concurrent-each.test.js']); - expect(json.numTotalTests).toBe(2); - expect(json.numPassedTests).toBe(1); + expect(json.numTotalTests).toBe(4); + expect(json.numPassedTests).toBe(2); expect(json.numFailedTests).toBe(0); - expect(json.numPendingTests).toBe(1); + expect(json.numPendingTests).toBe(2); + }); + + it('works with concurrent.only.each', () => { + const {json} = runWithJson('jasmine-async', [ + 'concurrent-only-each.test.js', + ]); + expect(json.numTotalTests).toBe(4); + expect(json.numPassedTests).toBe(2); + expect(json.numFailedTests).toBe(0); + expect(json.numPendingTests).toBe(2); }); it("doesn't execute more than 5 tests simultaneously", () => { diff --git a/e2e/jasmine-async/__tests__/concurrent-each.test.js b/e2e/jasmine-async/__tests__/concurrent-each.test.js index aad225234657..1e358d9db85c 100644 --- a/e2e/jasmine-async/__tests__/concurrent-each.test.js +++ b/e2e/jasmine-async/__tests__/concurrent-each.test.js @@ -7,19 +7,14 @@ 'use strict'; -it.concurrent.each( - [ - [1, 2], - [2, 3], - ], - 'adds one to number', - Promise.resolve() -); -it.concurrent.skip.each( - [ - [1, 2], - [2, 3], - ], - 'should skip this test', - Promise.resolve() -); +it.concurrent.each([ + [1, 2], + [2, 3], +])('adds one to number', async (a, b) => { + expect(a + 1).toBe(b); +}); + +it.concurrent.skip.each([ + [1, 2], + [2, 3], +])('should skip this test', Promise.resolve()); diff --git a/e2e/jasmine-async/__tests__/concurrent-only-each.test.js b/e2e/jasmine-async/__tests__/concurrent-only-each.test.js new file mode 100644 index 000000000000..c818e1de3d53 --- /dev/null +++ b/e2e/jasmine-async/__tests__/concurrent-only-each.test.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +it.concurrent.only.each([ + [1, 2], + [2, 3], +])('adds one to number', async (a, b) => { + expect(a + 1).toBe(b); +}); + +it.concurrent.each([ + [1, 2], + [2, 3], +])('adds one to number', async (a, b) => { + expect(a + 1).toBe(b); +});