Skip to content

Check only on specific events for chargedEventCounts in toFinishWith #44

@ruocco-l

Description

@ruocco-l

As of now you have to specify the whole chargedEventCounts properties otherwise the test will fail (if you don't include, for example actor-start: 1).

I think only specified property in the toFinishWith call should be checked.

Now:

// Test event has been applied to every datasetItem
        await expect(runWithPopularSorting).toFinishWith({
            datasetItemCount: { min: 1 },
            chargedEventCounts: {
                'popularity-filter-applied': expectedResults.length,
                result: expectedResults.length,
                'actor-start': 1,
            },
        });

Should be:

// Test event has been applied to every datasetItem
        await expect(runWithPopularSorting).toFinishWith({
            datasetItemCount: { min: 1 },
            chargedEventCounts: {
                'popularity-filter-applied': expectedResults.length,
            },
        });

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions