From b8d6991e9ddfc90066ba2bf697590ae334cfb7ab Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 18 Dec 2019 11:55:50 -0500 Subject: [PATCH] Measure unit test coverage of test utils --- awx/ui_next/jest.config.js | 3 ++- awx/ui_next/testUtils/enzymeHelpers.test.jsx | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/awx/ui_next/jest.config.js b/awx/ui_next/jest.config.js index 168160eb00..fb24626f6f 100644 --- a/awx/ui_next/jest.config.js +++ b/awx/ui_next/jest.config.js @@ -1,6 +1,7 @@ module.exports = { collectCoverageFrom: [ - 'src/**/*.{js,jsx}' + 'src/**/*.{js,jsx}', + 'testUtils/**/*.{js,jsx}' ], coveragePathIgnorePatterns: [ '/src/locales', diff --git a/awx/ui_next/testUtils/enzymeHelpers.test.jsx b/awx/ui_next/testUtils/enzymeHelpers.test.jsx index f5caaf5f75..44de31bed8 100644 --- a/awx/ui_next/testUtils/enzymeHelpers.test.jsx +++ b/awx/ui_next/testUtils/enzymeHelpers.test.jsx @@ -146,11 +146,8 @@ describe('waitForElement', () => { } catch (err) { error = err; } finally { - expect(error).toEqual( - new Error( - 'Expected condition for <#does-not-exist> not met: el => el.length === 1' - ) - ); + expect(error.message).toContain('Expected condition for <#does-not-exist> not met'); + expect(error.message).toContain('el.length === 1'); done(); } });