diff --git a/types/hexo-fs/hexo-fs-tests.ts b/types/hexo-fs/hexo-fs-tests.ts index d53a790ac1..fbfb6cb53a 100644 --- a/types/hexo-fs/hexo-fs-tests.ts +++ b/types/hexo-fs/hexo-fs-tests.ts @@ -595,7 +595,7 @@ it('emptyDir() - callback', callback => { join('folder', 'i.js') ]); - Promise.map([ + const dataArray: Array<[string, boolean]> = [ [join(target, '.hidden', 'a.txt'), true], [join(target, '.hidden', 'b.js'), true], [join(target, '.hidden', 'c', 'd'), true], @@ -605,7 +605,8 @@ it('emptyDir() - callback', callback => { [join(target, 'folder', 'h.txt'), false], [join(target, 'folder', 'i.js'), false], [join(target, 'folder', '.j'), true] - ] as Array<[string, boolean]>, data => { + ]; + Promise.map(dataArray, data => { return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); });