Skip to content

Improve resiliency on --bail #75

@noomorph

Description

@noomorph

Describe the bug

Sometimes I spectate:

            throw new errors_1.JestMetadataError(`Cannot associate a non-existent metadata with a test case: ${testCaseResult.fullName}`);
                  ^

JestMetadataError: Cannot associate a non-existent metadata with a test case: Status tests Simple passed
    at AssociateMetadata.testCaseResult (/Users/yaroslavs/Projects/wix-incubator/jest-allure2-reporter/node_modules/jest-metadata/dist/jest-reporter/AssociateMetadata.js:21:19)
    at ReporterServer.onTestCaseResult (/Users/yaroslavs/Projects/wix-incubator/jest-allure2-reporter/node_modules/jest-metadata/dist/jest-reporter/ReporterServer.js:64:25)
    at ReporterServer.memoized (/Users/yaroslavs/Projects/wix-incubator/jest-allure2-reporter/node_modules/jest-metadata/dist/utils/memoizeLast.js:11:34)
    at ReporterServer.memoized [as onTestCaseResult] (/Users/yaroslavs/Projects/wix-incubator/jest-allure2-reporter/node_modules/jest-metadata/dist/utils/memoizeArg1.js:12:24)

To Reproduce

Run many suites many times with many workers and --bail.

Expected behavior

This error should not happen. Maybe, jest-metadata should generate a fallback metadata with FallbackAPI despite the full-fledged mode.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions