diff --git a/e2e/__tests__/__snapshots__/empty-describe-with-hooks.test.js.snap b/e2e/__tests__/__snapshots__/empty-describe-with-hooks.test.js.snap index 735f97671258..6aed70d1a1aa 100644 --- a/e2e/__tests__/__snapshots__/empty-describe-with-hooks.test.js.snap +++ b/e2e/__tests__/__snapshots__/empty-describe-with-hooks.test.js.snap @@ -1,5 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`hook in describe with skipped test 1`] = ` +Object { + "rest": "", + "summary": "Test Suites: 1 skipped, 0 of 1 total +Tests: 1 skipped, 1 total +Snapshots: 0 total +Time: <> +Ran all test suites matching /hook-in-describe-with-skipped-test.test.js/i.", +} +`; + exports[`hook in empty describe 1`] = ` Object { "rest": "FAIL __tests__/hook-in-empty-describe.test.js diff --git a/e2e/__tests__/empty-describe-with-hooks.test.js b/e2e/__tests__/empty-describe-with-hooks.test.js index c283ff56dfe6..7a366e3b6bf6 100644 --- a/e2e/__tests__/empty-describe-with-hooks.test.js +++ b/e2e/__tests__/empty-describe-with-hooks.test.js @@ -23,6 +23,12 @@ test('hook in empty describe', () => { expect(extractSummary(result.stderr)).toMatchSnapshot(); }); +test('hook in describe with skipped test', () => { + const result = runJest(dir, ['hook-in-describe-with-skipped-test.test.js']); + expect(result.status).toBe(0); + expect(extractSummary(result.stderr)).toMatchSnapshot(); +}); + test('hook in empty nested describe', () => { const result = runJest(dir, ['hook-in-empty-nested-describe.test.js']); expect(result.status).toBe(1); diff --git a/e2e/empty-describe-with-hooks/__tests__/hook-in-describe-with-skipped-test.test.js b/e2e/empty-describe-with-hooks/__tests__/hook-in-describe-with-skipped-test.test.js new file mode 100644 index 000000000000..c187798a83ef --- /dev/null +++ b/e2e/empty-describe-with-hooks/__tests__/hook-in-describe-with-skipped-test.test.js @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. 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. + */ + +describe('a block', () => { + beforeEach(() => {}); + test.skip('skipped test', () => {}); +});