Skip to content
Merged
Prev Previous commit
Next Next commit
Update comments and address feedback
  • Loading branch information
trekforever committed Apr 3, 2024
commit 295636bbf19bada07efd375cbb7083732cb335e2
1 change: 0 additions & 1 deletion etc/firebase-admin.remote-config.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ export interface ServerTemplate {
cache: ServerTemplateData;
evaluate(context?: EvaluationContext): ServerConfig;
load(): Promise<void>;
toJSON(): string;
}

// @public
Expand Down
6 changes: 0 additions & 6 deletions src/remote-config/remote-config-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,6 @@ export interface ServerTemplate {
* project's {@link ServerTemplate}.
*/
load(): Promise<void>;

/**
* Convenient method that returns the JSON string of the cached template data
* @returns A JSON-string of this object.
*/
toJSON(): string;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/unit/remote-config/remote-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ describe('RemoteConfig', () => {
}
};
const initializedTemplate = remoteConfig.initServerTemplate({ template });
const parsed = JSON.parse(initializedTemplate.toJSON());
const parsed = JSON.parse(JSON.stringify(initializedTemplate.cache));
expect(parsed).deep.equals(deepCopy(template));
});

Expand All @@ -666,7 +666,7 @@ describe('RemoteConfig', () => {
};
const templateJson = JSON.stringify(template);
const initializedTemplate = remoteConfig.initServerTemplate({ template: templateJson });
const parsed = JSON.parse(initializedTemplate.toJSON());
const parsed = JSON.parse(JSON.stringify(initializedTemplate.cache));
const expectedVersion = deepCopy(VERSION_INFO);
expectedVersion.updateTime = new Date(expectedVersion.updateTime).toUTCString();
template.version = expectedVersion as Version;
Expand Down