Skip to content

Commit cd665f0

Browse files
committed
Add integration tests
1 parent 4090f74 commit cd665f0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/integration/app-check.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ describe('admin.appCheck', () => {
5353
expect(token).to.have.keys(['token', 'ttlMillis']);
5454
expect(token.token).to.be.a('string').and.to.not.be.empty;
5555
expect(token.ttlMillis).to.be.a('number');
56+
expect(token.ttlMillis).to.equals(3600000);
57+
});
58+
});
59+
60+
it('should succeed with a valid token and a custom ttl', function() {
61+
if (!appId) {
62+
this.skip();
63+
}
64+
return admin.appCheck().createToken(appId as string, { ttlMillis: 1800000 })
65+
.then((token) => {
66+
expect(token).to.have.keys(['token', 'ttlMillis']);
67+
expect(token.token).to.be.a('string').and.to.not.be.empty;
68+
expect(token.ttlMillis).to.be.a('number');
69+
expect(token.ttlMillis).to.equals(1800000);
5670
});
5771
});
5872

0 commit comments

Comments
 (0)