Skip to content

Commit 8c83dd8

Browse files
committed
Revert "separate out event type with auth context"
This reverts commit aa8df0f.
1 parent 92853d5 commit 8c83dd8

File tree

2 files changed

+34
-209
lines changed

2 files changed

+34
-209
lines changed

spec/v2/providers/firestore.spec.ts

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -558,23 +558,6 @@ describe("firestore", () => {
558558
expect(func.run(true as any)).to.eq(2);
559559
expect(func.__endpoint).to.deep.eq(expectedEp);
560560
});
561-
562-
it("calls init function", async () => {
563-
const event: firestore.RawFirestoreEvent = {
564-
...eventBase,
565-
datacontenttype: "application/json",
566-
data: {
567-
oldValue: null,
568-
value: null,
569-
},
570-
};
571-
572-
let hello;
573-
onInit(() => (hello = "world"));
574-
expect(hello).to.be.undefined;
575-
await firestore.onDocumentWrittenWithAuthContext("path", () => null)(event);
576-
expect(hello).to.equal("world");
577-
});
578561
});
579562

580563
describe("onDocumentCreatedWithAuthContext", () => {
@@ -622,23 +605,6 @@ describe("firestore", () => {
622605
expect(func.run(true as any)).to.eq(2);
623606
expect(func.__endpoint).to.deep.eq(expectedEp);
624607
});
625-
626-
it("calls init function", async () => {
627-
const event: firestore.RawFirestoreEvent = {
628-
...eventBase,
629-
datacontenttype: "application/json",
630-
data: {
631-
oldValue: null,
632-
value: null,
633-
},
634-
};
635-
636-
let hello;
637-
onInit(() => (hello = "world"));
638-
expect(hello).to.be.undefined;
639-
await firestore.onDocumentCreatedWithAuthContext("path", () => null)(event);
640-
expect(hello).to.equal("world");
641-
});
642608
});
643609

644610
describe("onDocumentUpdatedWithAuthContext", () => {
@@ -686,23 +652,6 @@ describe("firestore", () => {
686652
expect(func.run(true as any)).to.eq(2);
687653
expect(func.__endpoint).to.deep.eq(expectedEp);
688654
});
689-
690-
it("calls init function", async () => {
691-
const event: firestore.RawFirestoreEvent = {
692-
...eventBase,
693-
datacontenttype: "application/json",
694-
data: {
695-
oldValue: null,
696-
value: null,
697-
},
698-
};
699-
700-
let hello;
701-
onInit(() => (hello = "world"));
702-
expect(hello).to.be.undefined;
703-
await firestore.onDocumentUpdatedWithAuthContext("path", () => null)(event);
704-
expect(hello).to.equal("world");
705-
});
706655
});
707656

708657
describe("onDocumentDeletedWithAuthContext", () => {
@@ -750,23 +699,6 @@ describe("firestore", () => {
750699
expect(func.run(true as any)).to.eq(2);
751700
expect(func.__endpoint).to.deep.eq(expectedEp);
752701
});
753-
754-
it("calls init function", async () => {
755-
const event: firestore.RawFirestoreEvent = {
756-
...eventBase,
757-
datacontenttype: "application/json",
758-
data: {
759-
oldValue: null,
760-
value: null,
761-
},
762-
};
763-
764-
let hello;
765-
onInit(() => (hello = "world"));
766-
expect(hello).to.be.undefined;
767-
await firestore.onDocumentDeletedWithAuthContext("path", () => null)(event);
768-
expect(hello).to.equal("world");
769-
});
770702
});
771703

772704
describe("getOpts", () => {

0 commit comments

Comments
 (0)