Skip to content

Commit e0f293e

Browse files
committed
Test and changelog
1 parent 8652d8a commit e0f293e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.changeset/shy-bats-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/app': patch
3+
---
4+
5+
FirebaseServerApp should not be JSON serializable

packages/app/src/firebaseServerApp.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,24 @@ describe('FirebaseServerApp', () => {
135135

136136
expect(() => app.settings).throws('Firebase Server App has been deleted');
137137
});
138+
139+
it('should not be JSON serializable', () => {
140+
const options = {
141+
apiKey: 'APIKEY'
142+
};
143+
144+
const serverAppSettings: FirebaseServerAppSettings = {
145+
automaticDataCollectionEnabled: false,
146+
releaseOnDeref: options
147+
};
148+
149+
const app = new FirebaseServerAppImpl(
150+
options,
151+
serverAppSettings,
152+
'testName',
153+
new ComponentContainer('test')
154+
);
155+
156+
expect(JSON.stringify(app)).to.eql("undefined");
157+
});
138158
});

0 commit comments

Comments
 (0)