當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript strict.notEqual方法代碼示例

本文整理匯總了TypeScript中assert.strict.notEqual方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript strict.notEqual方法的具體用法?TypeScript strict.notEqual怎麽用?TypeScript strict.notEqual使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在assert.strict的用法示例。


在下文中一共展示了strict.notEqual方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: function

      bitgo.wallets().createWalletWithKeychains(options, function(err, result) {
        assert.equal(err, null);
        assert.notEqual(result, null);

        result.should.have.property('wallet');
        const wallet = result.wallet;

        assert.equal(wallet.balance(), 0);
        assert.equal(wallet.spendableBalance(), 0);
        assert.equal(wallet.label(), TEST_WALLET_LABEL);
        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, result.userKeychain.xpub);
        assert.equal(wallet.keychains[1].xpub, result.backupKeychain.xpub);

        result.userKeychain.should.have.property('encryptedXprv');
        result.backupKeychain.should.not.have.property('encryptedXprv');
        result.should.not.have.property('warning');

        result.wallet.canSendInstant().should.eql(true);

        wallet.delete({}, function() {});
        done();
      });
開發者ID:BitGo,項目名稱:BitGoJS,代碼行數:27,代碼來源:wallets.ts

示例2: function

 bitgo.refreshToken({ refreshToken: 'BADTOKEN' }, function(err, response) {
   // Expect error
   assert.notEqual(err, null);
   err.message.should.equal('invalid_grant');
   err.should.have.property('status');
   done();
 });
開發者ID:BitGo,項目名稱:BitGoJS,代碼行數:7,代碼來源:bitgo.ts

示例3: it

    it('create', function() {
      // must use seed of at least 128 bits
      // standard test vector taken from bip32 spec
      const seed = new Buffer('000102030405060708090a0b0c0d0e0f', 'hex');
      assert.equal(keychains.create({ seed: seed }).xprv, 'xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi');

      // two keys created one after the other with no seed should have
      // non-equivalent xprivs, i.e. check that the RNG is actually working.
      assert.notEqual(keychains.create().xprv, keychains.create().xprv);
    });
開發者ID:BitGo,項目名稱:BitGoJS,代碼行數:10,代碼來源:keychains.ts


注:本文中的assert.strict.notEqual方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。