From 042b4bd7365d19436f464d3e9bedb1c5c45bf481 Mon Sep 17 00:00:00 2001 From: Salakar Date: Wed, 11 Apr 2018 02:45:47 +0100 Subject: [PATCH] [tests][iid] added iid() tests -> 100% coverage --- bridge/e2e/iid/iid.e2e.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bridge/e2e/iid/iid.e2e.js diff --git a/bridge/e2e/iid/iid.e2e.js b/bridge/e2e/iid/iid.e2e.js new file mode 100644 index 00000000..1c249e5a --- /dev/null +++ b/bridge/e2e/iid/iid.e2e.js @@ -0,0 +1,22 @@ +describe('iid()', () => { + describe('get()', () => { + it('returns instance id string', async () => { + const iid = await firebase.iid().get(); + iid.should.be.a.String(); + }); + }); + + describe('delete()', () => { + it('deletes the current instance id', async () => { + const iidBefore = await firebase.iid().get(); + iidBefore.should.be.a.String(); + + await firebase.iid().delete(); + + const iidAfter = await firebase.iid().get(); + iidAfter.should.be.a.String(); + + iidBefore.should.not.equal(iidAfter); + }); + }); +});