Skip to content

Commit 71d6fb4

Browse files
committed
Add test case for wkh237#254, IOS file latestModifed date overflow issue
1 parent 065bf30 commit 71d6fb4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test-0.10.3.js

+14
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,17 @@ describe('#230 #249 cookies manipulation', (report, done) => {
7575
})
7676

7777
})
78+
79+
describe('#254 IOS fs.stat lastModified date correction', (report, done) => {
80+
81+
let path = dirs.DocumentDir + '/temp' + Date.now()
82+
fs.createFile(path, 'hello', 'utf8' )
83+
.then(() => fs.stat(path))
84+
.then((stat) => {
85+
console.log(stat)
86+
let p = stat.lastModified / Date.now()
87+
report(<Assert key="date is correct" expect={true} actual={ p< 1.05 && p > 0.95}/>)
88+
done()
89+
})
90+
91+
})

0 commit comments

Comments
 (0)