this is my project directory :
i'm making a projcet for fetch info from website and write into file as json
when i use 'fs-extra' module to check the content of file , i get different result:
it's pretty weird , if i am got a wrong path for check file's content , those three unit testing case must fail together , but the first one pass !
unit testing log:
i use an object to config the path :
var config = {
promiseData: '../data/promiseData.json',
asyncData: '../data/asyncData.json',
eventproxyData: '../data/eventproxyData.json'
}
and the data file all in the same directory , why the unit testing case only pass the first one ??
and then i try to use the readJson() and readJsonSync(), the result as before , only the first pass .
there are three same content in the file
and i'm confused and please help me , thanks a lot ~
the project address: callback
Aucun commentaire:
Enregistrer un commentaire