Skip to content

Commit 1d867cb

Browse files
committed
rename type in specs.
1 parent e162cec commit 1d867cb

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

spec/v1/cloud-functions.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { expect } from "chai";
2424

2525
import {
2626
onInit,
27-
Event,
27+
LegacyEvent,
2828
EventContext,
2929
makeCloudFunction,
3030
MakeCloudFunctionArgs,
@@ -43,7 +43,7 @@ describe("makeCloudFunction", () => {
4343
};
4444

4545
it("calls init function", async () => {
46-
const test: Event = {
46+
const test: LegacyEvent = {
4747
context: {
4848
eventId: "00000",
4949
timestamp: "2016-11-04T21:29:03.496Z",
@@ -253,7 +253,7 @@ describe("makeCloudFunction", () => {
253253
handler: (data: any, context: EventContext) => context,
254254
};
255255
const cf = makeCloudFunction(args);
256-
const test: Event = {
256+
const test: LegacyEvent = {
257257
context: {
258258
eventId: "00000",
259259
timestamp: "2016-11-04T21:29:03.496Z",
@@ -285,7 +285,7 @@ describe("makeCloudFunction", () => {
285285
triggerResource: () => null,
286286
};
287287
const cf = makeCloudFunction(args);
288-
const test: Event = {
288+
const test: LegacyEvent = {
289289
context: {
290290
eventId: "00000",
291291
timestamp: "2016-11-04T21:29:03.496Z",
@@ -325,7 +325,7 @@ describe("makeParams", () => {
325325
const cf = makeCloudFunction(args);
326326

327327
it("should construct params from the event resource of events", () => {
328-
const testEvent: Event = {
328+
const testEvent: LegacyEvent = {
329329
context: {
330330
eventId: "111",
331331
timestamp: "2016-11-04T21:29:03.496Z",

spec/v1/providers/analytics.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import { expect } from "chai";
2424

2525
import * as functions from "../../../src/v1";
26-
import { Event } from "../../../src/v1/cloud-functions";
26+
import { LegacyEvent } from "../../../src/v1/cloud-functions";
2727
import * as analytics from "../../../src/v1/providers/analytics";
2828
import * as analyticsSpecInput from "./analytics.spec.input";
2929
import { MINIMAL_V1_ENDPOINT } from "../../fixtures";
@@ -92,7 +92,7 @@ describe("Analytics Functions", () => {
9292

9393
// The event data delivered over the wire will be the JSON for an AnalyticsEvent:
9494
// https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data
95-
const event: Event = {
95+
const event: LegacyEvent = {
9696
data: {
9797
userDim: {
9898
userId: "hi!",
@@ -126,7 +126,7 @@ describe("Analytics Functions", () => {
126126
// Incoming events will have four kinds of "xValue" fields: "intValue",
127127
// "stringValue", "doubleValue" and "floatValue". We expect those to get
128128
// flattened away, leaving just their values.
129-
const event: Event = {
129+
const event: LegacyEvent = {
130130
data: {
131131
eventDim: [
132132
{
@@ -193,7 +193,7 @@ describe("Analytics Functions", () => {
193193
.event("first_open")
194194
.onLog((data: analytics.AnalyticsEvent) => data);
195195

196-
const event: Event = {
196+
const event: LegacyEvent = {
197197
data: {
198198
eventDim: [
199199
{
@@ -264,7 +264,7 @@ describe("Analytics Functions", () => {
264264
//
265265
// Separately, the input has a number of microsecond timestamps that we'd
266266
// like to rename and scale down to milliseconds.
267-
const event: Event = {
267+
const event: LegacyEvent = {
268268
data: {
269269
eventDim: [
270270
{
@@ -311,7 +311,7 @@ describe("Analytics Functions", () => {
311311
.event("app_remove")
312312
.onLog((data: analytics.AnalyticsEvent) => data);
313313

314-
const event: Event = {
314+
const event: LegacyEvent = {
315315
data: {
316316
eventDim: [
317317
{

spec/v1/providers/auth.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
import { expect } from "chai";
2424
import { UserRecord } from "../../../src/common/providers/identity";
2525
import * as functions from "../../../src/v1";
26-
import { CloudFunction, Event } from "../../../src/v1/cloud-functions";
26+
import { CloudFunction, LegacyEvent } from "../../../src/v1/cloud-functions";
2727
import * as auth from "../../../src/v1/providers/auth";
2828
import { MINIMAL_V1_ENDPOINT } from "../../fixtures";
2929

3030
describe("Auth Functions", () => {
31-
const event: Event = {
31+
const event: LegacyEvent = {
3232
data: {
3333
metadata: {
3434
creationTime: "2016-12-15T19:37:37.059Z",

spec/v1/providers/pubsub.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import { expect } from "chai";
2424

25-
import { Event, RESET_VALUE } from "../../../src/v1";
25+
import { LegacyEvent, RESET_VALUE } from "../../../src/v1";
2626
import { MINIMAL_V1_ENDPOINT } from "../../fixtures";
2727
import { MINIMAL_SCHEDULE_TRIGGER } from "./fixtures";
2828
import * as functions from "../../../src/v1";
@@ -125,7 +125,7 @@ describe("Pubsub Functions", () => {
125125

126126
it("should properly handle a new-style event", () => {
127127
const raw = new Buffer('{"hello":"world"}', "utf8").toString("base64");
128-
const event: Event = {
128+
const event: LegacyEvent = {
129129
data: {
130130
data: raw,
131131
attributes: {

spec/v1/providers/remoteConfig.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import { expect } from "chai";
2323

2424
import * as functions from "../../../src/v1";
25-
import { CloudFunction, Event } from "../../../src/v1/cloud-functions";
25+
import { CloudFunction, LegacyEvent } from "../../../src/v1/cloud-functions";
2626
import * as remoteConfig from "../../../src/v1/providers/remoteConfig";
2727
import { MINIMAL_V1_ENDPOINT } from "../../fixtures";
2828

@@ -96,7 +96,7 @@ describe("RemoteConfig Functions", () => {
9696

9797
describe("unwraps TemplateVersion", () => {
9898
let cloudFunctionUpdate: CloudFunction<remoteConfig.TemplateVersion>;
99-
let event: Event;
99+
let event: LegacyEvent;
100100

101101
before(() => {
102102
process.env.GCLOUD_PROJECT = "project1";

spec/v1/providers/storage.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// SOFTWARE.
2222

2323
import { expect } from "chai";
24-
import { Event } from "../../../src/v1";
24+
import { LegacyEvent } from "../../../src/v1";
2525
import * as config from "../../../src/common/config";
2626
import * as functions from "../../../src/v1";
2727
import * as storage from "../../../src/v1/providers/storage";
@@ -136,7 +136,7 @@ describe("Storage Functions", () => {
136136
const cloudFunction = storage.object().onArchive((data) => {
137137
return data.mediaLink;
138138
});
139-
const goodMediaLinkEvent: Event = {
139+
const goodMediaLinkEvent: LegacyEvent = {
140140
data: {
141141
mediaLink:
142142
"https://www.googleapis.com/storage/v1/b/mybucket.appspot.com" +

0 commit comments

Comments
 (0)