@@ -16,12 +16,10 @@ describe('DocStorageManager', function() {
1616 // Set Grist home to a temporary directory, and wipe it out on exit.
1717 let docsRoot : string ;
1818 let docStorageManager : DocStorageManager ;
19- before ( function ( ) {
20- return tmp . dirAsync ( { prefix : 'grist_test_' , unsafeCleanup : true } )
21- . then ( tmpDir => {
22- docsRoot = fse . realpathSync ( tmpDir ) ;
23- docStorageManager = new DocStorageManager ( docsRoot ) ;
24- } ) ;
19+ before ( async function ( ) {
20+ const tmpDir = await tmp . dirAsync ( { prefix : 'grist_test_' , unsafeCleanup : true } ) ;
21+ docsRoot = fse . realpathSync ( tmpDir ) ;
22+ docStorageManager = new DocStorageManager ( docsRoot ) ;
2523 } ) ;
2624
2725 describe ( 'getPath' , function ( ) {
@@ -81,7 +79,7 @@ describe('DocStorageManager', function() {
8179 // First create a doc, one under docsRoot, one outside; and include an attachment.
8280 fse . writeFileSync ( doc1 , "this is a test" ) ;
8381 const doc2 = tmp . fileSync ( {
84- prefix : 'DeleteTest2' , postfix : '.grist' , unsafeCleanup : true ,
82+ prefix : 'DeleteTest2' , postfix : '.grist' ,
8583 discardDescriptor : true
8684 } ) . name ;
8785 // Check that items got created as we expect.
0 commit comments