Skip to content

Commit bfb175e

Browse files
Adding back the callback assert
1 parent fbcfeef commit bfb175e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/firestore/test/unit/specs/spec_builder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ export class SpecBuilder {
464464
/**
465465
* Acks a write with a version and optional additional options.
466466
*
467-
* expectUserCallback defaults to true if options are omitted.
467+
* expectUserCallback defaults to true if omitted.
468468
*/
469469
writeAcks(
470470
doc: string,
@@ -478,7 +478,7 @@ export class SpecBuilder {
478478
writeAck: { version, keepInQueue: !!options.keepInQueue }
479479
};
480480

481-
if (options.expectUserCallback) {
481+
if (options.expectUserCallback !== false) {
482482
return this.expectUserCallbacks({ acknowledged: [doc] });
483483
} else {
484484
return this;
@@ -488,7 +488,7 @@ export class SpecBuilder {
488488
/**
489489
* Fails a write with an error and optional additional options.
490490
*
491-
* expectUserCallback defaults to true if options are omitted.
491+
* expectUserCallback defaults to true if omitted.
492492
*/
493493
failWrite(
494494
doc: string,
@@ -508,7 +508,7 @@ export class SpecBuilder {
508508

509509
this.currentStep = { failWrite: { error, keepInQueue } };
510510

511-
if (options.expectUserCallback) {
511+
if (options.expectUserCallback !== false) {
512512
return this.expectUserCallbacks({ rejected: [doc] });
513513
} else {
514514
return this;

0 commit comments

Comments
 (0)