Skip to content

Commit c389481

Browse files
skam22mikehardy
authored andcommitted
test(dynamic-links, e2e): add other platform (OFL) tests
1 parent 2c5afba commit c389481

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const { baseParams } = require('./dynamicLinks.e2e');
2+
3+
describe('dynamicLinks() dynamicLinkParams.otherPlatform', function () {
4+
it('throws if otherPlatform is not an object', function () {
5+
try {
6+
firebase.dynamicLinks().buildLink({
7+
...baseParams,
8+
otherPlatform: 123,
9+
});
10+
return Promise.reject(new Error('Did not throw Error.'));
11+
} catch (e) {
12+
e.message.should.containEql("'dynamicLinksParams.otherPlatform' must be an object");
13+
return Promise.resolve();
14+
}
15+
});
16+
17+
it('throws if otherPlatform.fallbackUrl is not a string', function () {
18+
try {
19+
firebase.dynamicLinks().buildLink({
20+
...baseParams,
21+
otherPlatform: {
22+
fallbackUrl: 123,
23+
},
24+
});
25+
return Promise.reject(new Error('Did not throw Error.'));
26+
} catch (e) {
27+
e.message.should.containEql("'dynamicLinksParams.otherPlatform.fallbackUrl' must be a string");
28+
return Promise.resolve();
29+
}
30+
});
31+
});

0 commit comments

Comments
 (0)