当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript assert.strict类代码示例

本文整理汇总了TypeScript中assert.strict的典型用法代码示例。如果您正苦于以下问题:TypeScript strict类的具体用法?TypeScript strict怎么用?TypeScript strict使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了strict类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

 keychains.update(options, function(err, keychain) {
   assert.equal(err, null);
   assert.equal(keychain.xpub, newKey.xpub);
   assert.equal(keychain.encryptedXprv, 'abracadabra');
   assert.equal(keychain.path, 'm');
   done();
 });
开发者ID:BitGo,项目名称:BitGoJS,代码行数:7,代码来源:keychains.ts

示例2: it

 it('arguments', function() {
   assert.throws(function() { pendingApprovals.list({}, 'invalid'); });
   assert.throws(function() { pendingApprovals.list('invalid'); });
   assert.throws(function() { pendingApprovals.list({ walletId: 54312 }); });
   assert.throws(function() { pendingApprovals.list({ enterpriseId: 54312 }); });
   assert.throws(function() { pendingApprovals.list({ walletId: TestBitGo.TEST_SHARED_WALLET_ADDRESS, enterpriseId: TestBitGo.TEST_ENTERPRISE }); });
 });
开发者ID:BitGo,项目名称:BitGoJS,代码行数:7,代码来源:pendingapprovals.ts

示例3: function

        bitgo.keychains().add(options, function(err, keychain) {
          assert.equal(err, null);
          assert.equal(keychain.xpub, keychains[1].xpub);

          bitgo.keychains().createBitGo({}, function(err, keychain) {
            assert(keychain.xpub);
            keychains.push(keychain);

            const options = {
              label: 'my wallet',
              m: 2,
              n: 3,
              keychains: keychains.map(function(k) { return { xpub: k.xpub }; })
            };
            wallets.add(options, function(err, wallet) {
              assert.equal(err, null);
              testWallet = wallet;

              assert.equal(wallet.balance(), 0);
              assert.equal(wallet.label(), 'my wallet');
              assert.equal(wallet.confirmedBalance(), 0);
              assert.equal(wallet.keychains.length, 3);
              assert.equal(bitgo.keychains().isValid({ key: wallet.keychains[0].xpub }), true);
              assert.equal(bitgo.keychains().isValid({ key: wallet.keychains[1].xpub }), true);
              assert.equal(bitgo.keychains().isValid({ key: wallet.keychains[2].xpub }), true);
              assert.equal(wallet.keychains[0].xpub, keychains[0].xpub);
              assert.equal(wallet.keychains[1].xpub, keychains[1].xpub);
              done();
            });
          });
        });
开发者ID:BitGo,项目名称:BitGoJS,代码行数:31,代码来源:wallets.ts

示例4: it

 it('should work fine for IPv4', () => {
   assert.equal(ip.validate('64.4.4.4'), true);
   assert.equal(ip.validate('64.4.4.boom!'), false);
   // @ts-ignore
   assert.equal(ip.validate(undefined), false);
   assert.equal(ip.validate('kraken'), false);
 });
开发者ID:runk,项目名称:node-maxmind,代码行数:7,代码来源:ip.test.ts

示例5: it

 it('arguments', function() {
   assert.throws(function() { bitgo.authenticate(); });
   assert.throws(function() { bitgo.authenticate(123); });
   assert.throws(function() { bitgo.authenticate('foo', 123); });
   assert.throws(function() { bitgo.authenticate({ username: 'foo', password: 'bar', otp: 0.01 }); });
   assert.throws(function() { bitgo.authenticate({ username: 'foo', password: 'bar', otp: 'baz' }, 123); });
 });
开发者ID:BitGo,项目名称:BitGoJS,代码行数:7,代码来源:bitgo.ts

示例6: it

 it('arguments', function() {
   assert.throws(function() { travel.sendMany({}); });
   assert.throws(function() { travel.sendMany({ txid: txid }); });
   assert.throws(function() { travel.sendMany({ txid: txid, travelInfos: 'foo' }); });
   assert.throws(function() { travel.sendMany({ txid: txid, travelInfos: {} }, 'invalid'); });
   assert.throws(function() { travel.sendMany({ txid: txid, travelInfos: [{}] }); });
 });
开发者ID:BitGo,项目名称:BitGoJS,代码行数:7,代码来源:travelRule.ts


注:本文中的assert.strict类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。