From 84deae86fcc52c02d142a009ba5bc0a758a94a3c Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Thu, 2 Aug 2018 16:35:31 -0700 Subject: [PATCH] Update skipped unwritten tests to deal with jest regression https://github.com/facebook/jest/issues/5493 --- packages/api-explorer/__tests__/CodeSample.test.jsx | 2 +- packages/api-explorer/__tests__/SecurityInput.test.jsx | 4 ++-- packages/api-explorer/__tests__/lib/Oas.test.js | 6 +++--- .../__tests__/lib/parameters-to-json-schema.test.js | 2 +- packages/api-explorer/__tests__/lib/show-code.test.js | 6 +++--- packages/api-explorer/__tests__/sanity-check-dist.test.jsx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/api-explorer/__tests__/CodeSample.test.jsx b/packages/api-explorer/__tests__/CodeSample.test.jsx index 84ec90814..c7adbb244 100644 --- a/packages/api-explorer/__tests__/CodeSample.test.jsx +++ b/packages/api-explorer/__tests__/CodeSample.test.jsx @@ -15,7 +15,7 @@ const props = { describe('tabs', () => { // TODO this doesnt work in readme - test('should display tabs if there are examples in the oas file'); + test.skip('should display tabs if there are examples in the oas file', () => {}); test('should display tabs if SAMPLES_ENABLED is true', () => { const languages = ['node', 'curl']; diff --git a/packages/api-explorer/__tests__/SecurityInput.test.jsx b/packages/api-explorer/__tests__/SecurityInput.test.jsx index c13c9803e..e1b2e75f7 100644 --- a/packages/api-explorer/__tests__/SecurityInput.test.jsx +++ b/packages/api-explorer/__tests__/SecurityInput.test.jsx @@ -49,8 +49,8 @@ describe('oauth2', () => { expect(securityInput.find('input').prop('value')).toBe(apiKey); }); - test('should display markdown description'); - test('should work for multiple oauths and allow selection'); + test.skip('should display markdown description', () => {}); + test.skip('should work for multiple oauths and allow selection', () => {}); test('should send auth apiKey into onChange()', () => { const onChange = jest.fn(); diff --git a/packages/api-explorer/__tests__/lib/Oas.test.js b/packages/api-explorer/__tests__/lib/Oas.test.js index 50a85ac85..363288285 100644 --- a/packages/api-explorer/__tests__/lib/Oas.test.js +++ b/packages/api-explorer/__tests__/lib/Oas.test.js @@ -224,12 +224,12 @@ describe('operation.prepareSecurity()', () => { expect(operation.prepareSecurity().Header.length).toBe(1); }); - test('should set a `key` property'); + test.skip('should set a `key` property', () => {}); // TODO We dont currently support cookies? - test('apiKey/cookie: should return with a type of Cookie'); + test.skip('apiKey/cookie: should return with a type of Cookie', () => {}); - test('should throw if attempting to use a non-existent scheme'); + test.skip('should throw if attempting to use a non-existent scheme', () => {}); test('should return empty object if no security', () => { const operation = new Oas(multipleSecurities).operation('/no-auth', 'post'); diff --git a/packages/api-explorer/__tests__/lib/parameters-to-json-schema.test.js b/packages/api-explorer/__tests__/lib/parameters-to-json-schema.test.js index 7bec69525..74a211a98 100644 --- a/packages/api-explorer/__tests__/lib/parameters-to-json-schema.test.js +++ b/packages/api-explorer/__tests__/lib/parameters-to-json-schema.test.js @@ -350,4 +350,4 @@ test('it should pull out schemas from `components/requestBodies`', () => { ]); }); -test('it should make things required correctly'); +test.skip('it should make things required correctly', () => {}); diff --git a/packages/api-explorer/__tests__/lib/show-code.test.js b/packages/api-explorer/__tests__/lib/show-code.test.js index 10d953d60..22fa9e9d3 100644 --- a/packages/api-explorer/__tests__/lib/show-code.test.js +++ b/packages/api-explorer/__tests__/lib/show-code.test.js @@ -2,9 +2,9 @@ const extensions = require('@readme/oas-extensions'); const showCode = require('../../src/lib/show-code'); -test('should return true if there are examples'); -test('should return true if there are results'); +test.skip('should return true if there are examples', () => {}); +test.skip('should return true if there are results', () => {}); test('should return true if it has try it now', () => { expect(showCode({ [extensions.EXPLORER_ENABLED]: true }, {})).toBe(true); }); -test('should return false otherwise'); +test.skip('should return false otherwise', () => {}); diff --git a/packages/api-explorer/__tests__/sanity-check-dist.test.jsx b/packages/api-explorer/__tests__/sanity-check-dist.test.jsx index 1c1a50ea0..8823a23b8 100644 --- a/packages/api-explorer/__tests__/sanity-check-dist.test.jsx +++ b/packages/api-explorer/__tests__/sanity-check-dist.test.jsx @@ -7,4 +7,4 @@ // expect(() => shallow()).not.toThrow(/element.type is not a function/); // }); -test('This test is taking too long on CI right now'); +test.skip('This test is taking too long on CI right now', () => {});