Browse Source

Merge pull request #204 from ryanxcharles/feature/fix-browser-tests-for-point-and-key

fix browser tests for Point and Key
patch-2
Ryan X. Charles 11 years ago
parent
commit
c88f465e45
  1. 1
      test/index.html
  2. 10
      test/test.Key.js
  3. 4
      test/test.Point.js

1
test/index.html

@ -28,6 +28,7 @@
<script src="test.Opcode.js"></script>
<script src="test.Peer.js"></script>
<script src="test.PeerManager.js"></script>
<script src="test.Point.js"></script>
<script src="test.PrivateKey.js"></script>
<script src="test.RpcClient.js"></script>
<script src="test.Script.js"></script>

10
test/test.Key.js

@ -1,12 +1,11 @@
'use strict';
var assert = require('assert');
var chai = chai || require('chai');
var bitcore = bitcore || require('../bitcore');
var coinUtil = coinUtil || require('../util/util');
var coinUtil = coinUtil || bitcore.util;
var buffertools = require('buffertools');
var should = chai.should();
var assert = chai.assert;
var Key = bitcore.Key;
describe('Key', function() {
@ -115,6 +114,10 @@ describe('Key', function() {
ret.should.equal(false);
});
//node tests only
//addUncompressed is a node-only interface feature
if (typeof process !== 'undefined' && process.versions) {
describe('#addUncompressed', function() {
it('should exist', function() {
should.exist(Key.addUncompressed);
@ -162,5 +165,6 @@ describe('Key', function() {
});
});
}
});

4
test/test.Point.js

@ -1,13 +1,13 @@
'use strict';
var assert = require('assert');
var chai = chai || require('chai');
var bitcore = bitcore || require('../bitcore');
var coinUtil = coinUtil || require('../util/util');
var coinUtil = coinUtil || bitcore.util;
var buffertools = require('buffertools');
var bignum = require('bignum');
var should = chai.should();
var assert = chai.assert;
var Point = bitcore.Point;
var Key = bitcore.Key;

Loading…
Cancel
Save