mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
fix flaky test 'produces a valid junit report for failures' (#143995)
* fix flaky test 'produces a valid junit report for failures' After the upgrading to Jest 27, it appears the runtime of this test is occasionally reported as 0. 0 is evaluated to false and time is left out of the junit report. This updates the conditional to check for type number. Closes #143993 * unskip
This commit is contained in:
parent
cf8e6a7eaa
commit
7a056a84d9
2 changed files with 4 additions and 4 deletions
|
@ -26,8 +26,7 @@ afterAll(async () => {
|
|||
});
|
||||
|
||||
const parseXml = promisify(xml2js.parseString);
|
||||
// FLAKY https://github.com/elastic/kibana/issues/143993
|
||||
it.skip(
|
||||
it(
|
||||
'produces a valid junit report for failures',
|
||||
async () => {
|
||||
const result = await execa(
|
||||
|
|
|
@ -60,8 +60,9 @@ export default class JestJUnitReporter extends BaseReporter {
|
|||
);
|
||||
|
||||
const msToIso = (ms: number | null | undefined) =>
|
||||
ms ? new Date(ms).toISOString().slice(0, -5) : undefined;
|
||||
const msToSec = (ms: number | null | undefined) => (ms ? (ms / 1000).toFixed(3) : undefined);
|
||||
typeof ms === 'number' ? new Date(ms).toISOString().slice(0, -5) : undefined;
|
||||
const msToSec = (ms: number | null | undefined) =>
|
||||
typeof ms === 'number' ? (ms / 1000).toFixed(3) : undefined;
|
||||
|
||||
root.att({
|
||||
name: 'jest',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue