[firestore] Add setLogLevel support

This commit is contained in:
Chris Bianca
2018-04-13 08:41:17 +01:00
parent c27918c53c
commit 1922a25198
6 changed files with 98 additions and 76 deletions

View File

@@ -144,11 +144,17 @@ function firestoreTests({ before, describe, it, context, firebase }) {
});
context('setLogLevel()', () => {
it('should throw an unsupported error', () => {
it('should work without error', () => {
firebase.native.firestore.setLogLevel('debug');
firebase.native.firestore.setLogLevel('error');
firebase.native.firestore.setLogLevel('silent');
});
it('should throw an invalid parameter error', () => {
(() => {
firebase.native.firestore().setLogLevel();
firebase.native.firestore.setLogLevel('warn');
}).should.throw(
'firebase.firestore().setLogLevel() is unsupported by the native Firebase SDKs.'
'Argument `logLevel` must be one of: `debug`, `error`, `silent`'
);
});
});