You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
418 B
17 lines
418 B
10 years ago
|
'use strict';
|
||
|
|
||
10 years ago
|
var should = require('chai').should();
|
||
7 years ago
|
var bch = require('..');
|
||
10 years ago
|
|
||
10 years ago
|
describe('#versionGuard', function() {
|
||
10 years ago
|
it('global._bitcore should be defined', function() {
|
||
7 years ago
|
should.equal(global._bch, bch.version);
|
||
10 years ago
|
});
|
||
|
|
||
10 years ago
|
it('throw an error if version is already defined', function() {
|
||
|
(function() {
|
||
7 years ago
|
bch.versionGuard('version');
|
||
7 years ago
|
}).should.throw('More than one instance of bitcoincashjs');
|
||
10 years ago
|
});
|
||
|
});
|