tests: use filepaths directly
After a long IRC discussion, it was decided that the use of direct filepaths instead of the module is a more pure form of testing , although it may provide less overall coverage than the mixed integration style imports used previously. This will need to be remedied by further integration testing in /test/integration.
This commit is contained in:
parent
e27c97a791
commit
6c0eebe94b
16 changed files with 48 additions and 47 deletions
|
@ -1,7 +1,7 @@
|
|||
var assert = require('assert')
|
||||
var Address = require('..').Address
|
||||
var networks = require('..').networks
|
||||
var Script = require('..').Script
|
||||
var Address = require('../src/address')
|
||||
var networks = require('../src/networks')
|
||||
var Script = require('../src/script')
|
||||
|
||||
var b58fixtures = require('./fixtures/base58')
|
||||
var fixtures = require('./fixtures/address')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var assert = require('assert')
|
||||
var base58 = require('..').base58
|
||||
var base58 = require('../src/base58')
|
||||
var fixtures = require('./fixtures/base58')
|
||||
|
||||
function b2h(b) { return new Buffer(b).toString('hex') }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var assert = require('assert')
|
||||
var base58check = require('..').base58check
|
||||
var base58check = require('../src/base58check')
|
||||
var fixtures = require('./fixtures/base58check')
|
||||
|
||||
function b2h(b) { return new Buffer(b).toString('hex') }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var assert = require('assert')
|
||||
var bufferutils = require('..').bufferutils
|
||||
var bufferutils = require('../src/bufferutils')
|
||||
|
||||
var fixtures = require('./fixtures/buffer.js')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var assert = require('assert')
|
||||
var convert = require('..').convert
|
||||
var convert = require('../src/convert')
|
||||
|
||||
describe('convert', function() {
|
||||
describe('byte array and word array conversions', function(){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var assert = require('assert')
|
||||
var crypto = require('..').crypto
|
||||
var crypto = require('../src/crypto')
|
||||
|
||||
var fixtures = require('./fixtures/crypto')
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
var assert = require('assert')
|
||||
|
||||
var sec = require('..').sec
|
||||
var sec = require('../src/sec')
|
||||
var ecparams = sec('secp256k1')
|
||||
|
||||
var BigInteger = require('bigi')
|
||||
var ECPointFp = require('..').ECPointFp
|
||||
var ECPointFp = require('../src/ec').ECPointFp
|
||||
|
||||
describe('ec', function() {
|
||||
describe('ECPointFp', function() {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
var assert = require('assert')
|
||||
var crypto = require('..').crypto
|
||||
var ecdsa = require('..').ecdsa
|
||||
var crypto = require('../src/crypto')
|
||||
var ecdsa = require('../src/ecdsa')
|
||||
|
||||
var sec = require('..').sec
|
||||
var sec = require('../src/sec')
|
||||
var ecparams = sec("secp256k1")
|
||||
|
||||
var BigInteger = require('bigi')
|
||||
var ECKey = require('..').ECKey
|
||||
var ECPubKey = require('..').ECPubKey
|
||||
var Message = require('..').Message
|
||||
var ECKey = require('../src/eckey')
|
||||
var ECPubKey = require('../src/ecpubkey')
|
||||
var Message = require('../src/message')
|
||||
|
||||
var fixtures = require('./fixtures/ecdsa.js')
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
var assert = require('assert')
|
||||
var crypto = require('..').crypto
|
||||
var crypto = require('../src/crypto')
|
||||
|
||||
var ECKey = require('..').ECKey
|
||||
var ECPubKey = require('..').ECPubKey
|
||||
var ECKey = require('../src/eckey')
|
||||
var ECPubKey = require('../src/ecpubkey')
|
||||
|
||||
describe('ECKey', function() {
|
||||
describe('constructor', function() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
var assert = require('assert')
|
||||
|
||||
var ECPubKey = require('..').ECPubKey
|
||||
var ECPubKey = require('../src/ecpubkey')
|
||||
|
||||
describe('ECPubKey', function() {
|
||||
describe('toBuffer/toHex', function() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
var assert = require('assert')
|
||||
|
||||
var HDWallet = require('../').HDWallet
|
||||
var HDWallet = require('../src/hdwallet')
|
||||
|
||||
function b2h(buf) {
|
||||
assert(Buffer.isBuffer(buf))
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
var assert = require('assert');
|
||||
var assert = require('assert')
|
||||
|
||||
var Address = require('../../src/address');
|
||||
var ECKey = require('../../src/eckey').ECKey;
|
||||
var T = require('../../src/transaction');
|
||||
var Transaction = T.Transaction;
|
||||
var Script = require('../../src/script');
|
||||
var networks = require('../../src/networks');
|
||||
var crypto = require('../../src/crypto');
|
||||
var bitcoin = require('../../')
|
||||
var crypto = bitcoin.crypto
|
||||
var networks = bitcoin.networks
|
||||
|
||||
var Address = bitcoin.Address
|
||||
var ECKey = bitcoin.ECKey
|
||||
var Transaction = bitcoin.Transaction
|
||||
var Script = bitcoin.Script
|
||||
|
||||
var helloblock = require('helloblock-js')({
|
||||
network: 'testnet'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
var assert = require('assert')
|
||||
var networks = require('..').networks
|
||||
var networks = require('../src/networks')
|
||||
|
||||
var ECKey = require('..').ECKey
|
||||
var Message = require('..').Message
|
||||
var ECKey = require('../src/eckey')
|
||||
var Message = require('../src/message')
|
||||
|
||||
var fixtures = require('./fixtures/message')
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
var assert = require('assert')
|
||||
var crypto = require('..').crypto
|
||||
var networks = require('..').networks
|
||||
var crypto = require('../src/crypto')
|
||||
var networks = require('../src/networks')
|
||||
|
||||
var Address = require('..').Address
|
||||
var Script = require('..').Script
|
||||
var Address = require('../src/address')
|
||||
var Script = require('../src/script')
|
||||
|
||||
var fixtures = require('./fixtures/script')
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
var assert = require('assert')
|
||||
var networks = require('..').networks
|
||||
var networks = require('../src/networks')
|
||||
|
||||
var Address = require('..').Address
|
||||
var ECKey = require('..').ECKey
|
||||
var Transaction = require('..').Transaction
|
||||
var Script = require('..').Script
|
||||
var Address = require('../src/address')
|
||||
var ECKey = require('../src/eckey')
|
||||
var Transaction = require('../src/transaction').Transaction
|
||||
var Script = require('../src/script')
|
||||
|
||||
var fixtureTxes = require('./fixtures/mainnet_tx')
|
||||
var fixtureTx1Hex = fixtureTxes.prevTx
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
var assert = require('assert')
|
||||
var crypto = require('../').crypto
|
||||
var crypto = require('../src/crypto')
|
||||
var sinon = require('sinon')
|
||||
|
||||
var Address = require('..').Address
|
||||
var HDWallet = require('..').HDWallet
|
||||
var Script = require('..').Script
|
||||
var Transaction = require('..').Transaction
|
||||
var Wallet = require('..').Wallet
|
||||
var Address = require('../src/address')
|
||||
var HDWallet = require('../src/hdwallet')
|
||||
var Script = require('../src/script')
|
||||
var Transaction = require('../src/transaction').Transaction
|
||||
var Wallet = require('../src/wallet')
|
||||
|
||||
var fixtureTxes = require('./fixtures/mainnet_tx')
|
||||
var fixtureTx1Hex = fixtureTxes.prevTx
|
||||
|
|
Loading…
Reference in a new issue