-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix all broken stories * In stories that were broken, add an associated Jest test so they if they break in the future we'll know * Fix all console.error messages that were being printed during Jest test runs * Add test setup which makes it so `console.error` throws an error so tests will fail if error console messages are printed # Conflicts: # x-pack/plugins/apm/public/components/shared/backend_link.stories.tsx
- Loading branch information
Showing
23 changed files
with
492 additions
and
1,600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
/* global jest */ | ||
|
||
// When a `console.error` is encountered, throw the error to make the test fail. | ||
// This effectively treats logged errors during the test run as failures. | ||
jest.spyOn(console, 'error').mockImplementation((message) => { | ||
throw new Error(message); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
x-pack/plugins/apm/public/components/app/error_group_overview/List/List.test.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.