vest 5.4.5 → 5.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1259,6 +1259,7 @@ function useWithinActiveOmitWhen() {
1259
1259
  return useOmitted();
1260
1260
  }
1261
1261
 
1262
+ // eslint-disable-next-line complexity
1262
1263
  function useVerifyTestRun(testObject, collisionResult = testObject) {
1263
1264
  const testData = VestTest.getData(testObject);
1264
1265
  if (useShouldSkipBasedOnMode(testData)) {
@@ -1686,7 +1687,19 @@ function useRunDoneCallbacks() {
1686
1687
  function useInitVestBus() {
1687
1688
  const VestBus = vestjsRuntime.Bus.useBus();
1688
1689
  on('TEST_COMPLETED', () => { });
1689
- // on("TEST_RUN_STARTED", () => {});
1690
+ on('TEST_RUN_STARTED', () => {
1691
+ // Bringin this back due to https://github.com/ealush/vest/issues/1157
1692
+ // This is a very pecluiar bug in which we're seeing vest behaving differently between
1693
+ // runs when suite.get() is called.
1694
+ // In the bug we experienced that failing tests were skipped in the second run.
1695
+ // The reason: suite.get() built the failures cache. Calling suite.get() before the test run
1696
+ // made Vest think that the field already had failing tests (even though it was the same test!)
1697
+ // and it skipped the test.
1698
+ // A better solution is to be able to identify each failure to its actual position in the suite
1699
+ // but this requires some rearchitecting within Vest.
1700
+ // This is an easy enough solution - we just reset the cache before the test run, let's hope we don't see
1701
+ // any performance issues.
1702
+ });
1690
1703
  VestBus.on(vestjsRuntime.RuntimeEvents.ISOLATE_PENDING, (isolate) => {
1691
1704
  if (VestTest.is(isolate)) {
1692
1705
  VestTest.setPending(isolate);