[tests] update messaging onTokenRefresh test

This commit is contained in:
Michael Diarmid 2017-06-20 14:43:30 +01:00 committed by GitHub
parent 7e3042cc92
commit 48cd86e353
1 changed files with 5 additions and 7 deletions

View File

@ -113,16 +113,14 @@ function messagingTests({ describe, it, firebase }) {
return Promise.resolve();
});
it('it should create/remove onTokenRefresh listeners', () => {
const cb = () => {
};
it('it should create/remove onTokenRefresh listeners', () => {
try {
const listener = firebase.native.messaging().onTokenRefresh(cb);
listener.remove();
const unsub = firebase.native.messaging().onTokenRefresh(() => {});
unsub();
} catch (e) {
console.error(e);
return Promise.reject(e);
}
return Promise.resolve();
});