UNPKG

429 BJavaScriptView Raw
1"use strict";
2
3var should = require("chai").should();
4var bitcore = require("../");
5
6describe('#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});