refactor double quote
This commit is contained in:
parent
3208ca2a44
commit
ab517cae9c
|
@ -41,10 +41,10 @@ function Unit(amount, code) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var UNITS = {
|
var UNITS = {
|
||||||
"BTC" : [1e8, 8],
|
'BTC' : [1e8, 8],
|
||||||
"mBTC" : [1e5, 5],
|
'mBTC' : [1e5, 5],
|
||||||
"bits" : [1e2, 2],
|
'bits' : [1e2, 2],
|
||||||
"satoshis" : [1, 0]
|
'satoshis' : [1, 0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(UNITS).forEach(function(key) {
|
Object.keys(UNITS).forEach(function(key) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ describe('Unit', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should expose shorthand conversion methods', function() {
|
it('should expose shorthand conversion methods', function() {
|
||||||
var unit = new Unit(1.3, "BTC");
|
var unit = new Unit(1.3, 'BTC');
|
||||||
unit.toBTC().should.equal(unit.BTC);
|
unit.toBTC().should.equal(unit.BTC);
|
||||||
unit.toMilis().should.equal(unit.mBTC);
|
unit.toMilis().should.equal(unit.mBTC);
|
||||||
unit.toBits().should.equal(unit.bits);
|
unit.toBits().should.equal(unit.bits);
|
||||||
|
@ -89,7 +89,7 @@ describe('Unit', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should expose a general conversion method', function() {
|
it('should expose a general conversion method', function() {
|
||||||
var unit = new Unit(1.3, "BTC");
|
var unit = new Unit(1.3, 'BTC');
|
||||||
unit.to(Unit.BTC).should.equal(unit.BTC);
|
unit.to(Unit.BTC).should.equal(unit.BTC);
|
||||||
unit.to(Unit.mBTC).should.equal(unit.mBTC);
|
unit.to(Unit.mBTC).should.equal(unit.mBTC);
|
||||||
unit.to(Unit.bits).should.equal(unit.bits);
|
unit.to(Unit.bits).should.equal(unit.bits);
|
||||||
|
@ -97,13 +97,13 @@ describe('Unit', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have a toString method', function() {
|
it('should have a toString method', function() {
|
||||||
var unit = new Unit(1.3, "BTC");
|
var unit = new Unit(1.3, 'BTC');
|
||||||
should.exist(unit.toString);
|
should.exist(unit.toString);
|
||||||
unit.toString().should.be.a('string');
|
unit.toString().should.be.a('string');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have an inspect method', function() {
|
it('should have an inspect method', function() {
|
||||||
var unit = new Unit(1.3, "BTC");
|
var unit = new Unit(1.3, 'BTC');
|
||||||
should.exist(unit.inspect);
|
should.exist(unit.inspect);
|
||||||
unit.inspect().should.be.a('string');
|
unit.inspect().should.be.a('string');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue