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,
},
});
As of now you have to specify the whole
chargedEventCountsproperties otherwise the test will fail (if you don't include, for exampleactor-start: 1).I think only specified property in the
toFinishWithcall should be checked.Now:
Should be: