TypeScript @0xproject-dev-utils.BlockchainLifecycle类(方法)实例源码

下面列出了TypeScript @0xproject-dev-utils.BlockchainLifecycle 类(方法)源码代码实例,从而了解它的用法。

作者:ewingr    项目:0x-monorep   
beforeEach(async () => {
     await blockchainLifecycle.startAsync();
     const sinonTimerConfig = { shouldAdvanceTime: true } as any;
     // This constructor has incorrect types
     timer = Sinon.useFakeTimers(sinonTimerConfig);
     currentUnixTimestampSec = utils.getCurrentUnixTimestampSec();
     expirationWatcher = new ExpirationWatcher();
 });

作者:ewingr    项目:0x-monorep   
afterEach(async () => {
     await blockchainLifecycle.revertAsync();
 });

作者:ewingr    项目:0x-monorep   
beforeEach(async () => {
     await blockchainLifecycle.startAsync();
 });

作者:ewingr    项目:0x-monorep   
afterEach(async () => {
     await blockchainLifecycle.revertAsync();
     timer.restore();
     expirationWatcher.unsubscribe();
 });


问题


面经


文章

微信
公众号

扫码关注公众号