unit-synonyms-electric-current
Version:
Electric current units synonyms
32 lines (23 loc) • 790 B
JavaScript
/*jshint node:true, mocha:true */
;
require('should');
var electricCurrent = require('../src/');
var units = electricCurrent.units;
var synonyms = electricCurrent.synonyms;
describe('electric current units synonyms', function() {
it('should be an objecct', function() {
({}.toString.call(synonyms)).should.equal('[object Object]');
});
it('should include synonyms for supported units only', function() {
var unitsWithSynonyms = {};
Object.keys(synonyms).forEach(function(unit) {
unitsWithSynonyms[synonyms[unit]] = true;
});
unitsWithSynonyms.should.have.keys(units);
});
it('should have identity synonyms', function() {
units.every(function(unit) {
return synonyms[unit] === unit;
}).should.be.exactly(true);
});
});