我的控制台的输出。请注意,控制台日志是乱序的(1,3,4,2 而不是 1,2,3,4)
代码在这里
it('can store file', () => {
console.log('1) file storage start')
return filestore.store.q(file).then(() => {
console.log('2) file storage done')
}).should.eventually.be.fullfilled
})
describe('block number', () => {
beforeEach(() => {
console.log('3) check blockNumber')
return web3.Q.all([
web3.eth.getBlockNumber.q().then((_blockNumber) => {
blockNumber = _blockNumber
}),
web3.eth.getMining.q().then((isMining) => {
})
])
})
it('can retreive files block number', () => {
console.log('4) retreive')
return filestore.getBlockNumber.q(fileHash).should.eventually.bignumber.equal(blockNumber)
})
})