File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
packages/dynamic-links/e2e Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments