1 | ;
|
2 |
|
3 | var should = require("chai").should();
|
4 | var bitcore = require("../");
|
5 |
|
6 | describe('#versionGuard', function() {
|
7 | it('global._bitcore should be defined', function() {
|
8 | should.equal(global._bitcore, bitcore.version);
|
9 | });
|
10 |
|
11 | it('throw an error if version is already defined', function() {
|
12 | (function() {
|
13 | bitcore.versionGuard('version');
|
14 | }).should.throw('More than one instance of bitcore');
|
15 | });
|
16 | });
|