@sprucelabs/heartwood-view-controllers 118.2.18 → 118.2.20

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.
@@ -192,6 +192,7 @@ const vcAssert = {
192
192
  var _a;
193
193
  try {
194
194
  let wasHit = false;
195
+ let actionPromise;
195
196
  let dialogVc;
196
197
  let dialogPromise = new Promise((resolve) => {
197
198
  var _a, _b, _c;
@@ -211,6 +212,7 @@ const vcAssert = {
211
212
  const oldHide = dialogVc.hide.bind(dialogVc);
212
213
  dialogVc.hide = () => __awaiter(this, void 0, void 0, function* () {
213
214
  yield oldHide();
215
+ yield actionPromise;
214
216
  yield new Promise((r) => setTimeout(r, 0));
215
217
  });
216
218
  return dialogVc;
@@ -243,7 +245,8 @@ const vcAssert = {
243
245
  };
244
246
  run = () => __awaiter(this, void 0, void 0, function* () {
245
247
  try {
246
- yield wait(action(), dialogPromise);
248
+ actionPromise = action();
249
+ yield wait(actionPromise, dialogPromise);
247
250
  assert.isTrue(wasHit, `this.renderInDialog() was not invoked in your view controller within ${WAIT_TIMEOUT} milliseconds.`);
248
251
  yield dialogHandlerPromise;
249
252
  assert.isTruthy(dialogVc);
@@ -172,6 +172,7 @@ const vcAssert = {
172
172
  return new Promise((resolve, reject) => {
173
173
  try {
174
174
  let wasHit = false;
175
+ let actionPromise;
175
176
  let dialogVc;
176
177
  let dialogPromise = new Promise((resolve) => {
177
178
  const renderInDialogHandler = (...args) => {
@@ -190,6 +191,7 @@ const vcAssert = {
190
191
  const oldHide = dialogVc.hide.bind(dialogVc);
191
192
  dialogVc.hide = async () => {
192
193
  await oldHide();
194
+ await actionPromise;
193
195
  await new Promise((r) => setTimeout(r, 0));
194
196
  };
195
197
  return dialogVc;
@@ -222,7 +224,8 @@ const vcAssert = {
222
224
  };
223
225
  run = async () => {
224
226
  try {
225
- await (0, assertSupport_1.wait)(action(), dialogPromise);
227
+ actionPromise = action();
228
+ await (0, assertSupport_1.wait)(actionPromise, dialogPromise);
226
229
  test_utils_1.assert.isTrue(wasHit, `this.renderInDialog() was not invoked in your view controller within ${assertSupport_1.WAIT_TIMEOUT} milliseconds.`);
227
230
  await dialogHandlerPromise;
228
231
  test_utils_1.assert.isTruthy(dialogVc);
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "118.2.18",
16
+ "version": "118.2.20",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {
@@ -77,10 +77,10 @@
77
77
  "@babel/plugin-transform-runtime": "^7.26.10",
78
78
  "@babel/preset-env": "^7.26.9",
79
79
  "@babel/preset-typescript": "^7.27.0",
80
- "@sprucelabs/calendar-utils": "^42.0.682",
80
+ "@sprucelabs/calendar-utils": "^42.0.683",
81
81
  "@sprucelabs/error": "^6.0.596",
82
82
  "@sprucelabs/globby": "^2.0.502",
83
- "@sprucelabs/mercury-core-events": "^26.0.63",
83
+ "@sprucelabs/mercury-core-events": "^26.0.64",
84
84
  "@sprucelabs/mercury-types": "^47.2.73",
85
85
  "@sprucelabs/schema": "^31.0.84",
86
86
  "@sprucelabs/spruce-core-schemas": "^40.1.676",
@@ -101,8 +101,8 @@
101
101
  "devDependencies": {
102
102
  "@sprucelabs/esm-postbuild": "^6.0.561",
103
103
  "@sprucelabs/jest-json-reporter": "^8.0.597",
104
- "@sprucelabs/mercury-client": "^42.0.782",
105
- "@sprucelabs/mercury-event-emitter": "^42.0.782",
104
+ "@sprucelabs/mercury-client": "^42.0.783",
105
+ "@sprucelabs/mercury-event-emitter": "^42.0.783",
106
106
  "@sprucelabs/resolve-path-aliases": "^2.0.539",
107
107
  "@sprucelabs/semantic-release": "^5.0.2",
108
108
  "@sprucelabs/test": "^9.0.78",