@@ -70,18 +70,14 @@ describe("Sharing", function () {
7070 . and . have . deep . property ( "Url" ) . that . is . not . null ;
7171 } ) ;
7272
73- it ( "getShareLink (AnonymousView)" , function ( ) {
74- return expect ( folder . getShareLink ( SharingLinkKind . AnonymousView ) )
75- . to . eventually . be . fulfilled
76- . and . have . property ( "sharingLinkInfo" )
77- . and . have . deep . property ( "Url" ) . that . is . not . null ;
73+ it ( "getShareLink (AnonymousView)" , async function ( ) {
74+ const sharing = await folder . getShareLink ( SharingLinkKind . AnonymousView ) ;
75+ return expect ( sharing ) . to . have . property ( "sharingLinkInfo" ) . and . have . deep . property ( "Url" ) . that . is . not . null ;
7876 } ) ;
7977
80- it ( "getShareLink (ExpirationDate)" , function ( ) {
81- return expect ( folder . getShareLink ( SharingLinkKind . AnonymousView , dateAdd ( new Date ( ) , "day" , 5 ) ) )
82- . to . eventually . be . fulfilled
83- . and . have . property ( "sharingLinkInfo" )
84- . and . have . deep . property ( "Url" ) . that . is . not . null ;
78+ it ( "getShareLink (ExpirationDate)" , async function ( ) {
79+ const sharing = await folder . getShareLink ( SharingLinkKind . AnonymousView , dateAdd ( new Date ( ) , "day" , 5 ) ) ;
80+ return expect ( sharing ) . to . have . property ( "sharingLinkInfo" ) . and . have . deep . property ( "Url" ) . that . is . not . null ;
8581 } ) ;
8682
8783 it ( ".shareWith (Edit)" , function ( ) {
@@ -235,18 +231,14 @@ describe("Sharing", function () {
235231 . and . have . deep . property ( "Url" ) . that . is . not . null ;
236232 } ) ;
237233
238- it ( "getShareLink (AnonymousView)" , function ( ) {
239- return expect ( item . getShareLink ( SharingLinkKind . AnonymousView ) )
240- . to . eventually . be . fulfilled
241- . and . have . property ( "sharingLinkInfo" )
242- . and . have . deep . property ( "Url" ) . that . is . not . null ;
234+ it ( "getShareLink (AnonymousView)" , async function ( ) {
235+ const sharing = await item . getShareLink ( SharingLinkKind . AnonymousView ) ;
236+ return expect ( sharing ) . to . have . property ( "sharingLinkInfo" ) . and . have . deep . property ( "Url" ) . that . is . not . null ;
243237 } ) ;
244238
245- it ( "getShareLink (ExpirationDate)" , function ( ) {
246- return expect ( item . getShareLink ( SharingLinkKind . AnonymousView , dateAdd ( new Date ( ) , "day" , 5 ) ) )
247- . to . eventually . be . fulfilled
248- . and . have . property ( "sharingLinkInfo" )
249- . and . have . deep . property ( "Url" ) . that . is . not . null ;
239+ it ( "getShareLink (ExpirationDate)" , async function ( ) {
240+ const sharing = await item . getShareLink ( SharingLinkKind . AnonymousView , dateAdd ( new Date ( ) , "day" , 5 ) ) ;
241+ return expect ( sharing ) . to . have . property ( "sharingLinkInfo" ) . and . have . deep . property ( "Url" ) . that . is . not . null ;
250242 } ) ;
251243
252244 it ( ".shareWith (Edit)" , async function ( ) {
0 commit comments