UNPKG

node-elizabeth

Version:
28 lines (20 loc) 841 B
'use strict'; var _providers = require('../providers.js'); var _scientific = require('../locales/int/scientific.js'); var _util = require('./../util'); var science = new _providers.Science(); var data = (0, _util.pull)('science.json', 'en'); describe('Test science provider', function () { it('should be in array', function () { expect(_scientific.MATH_FORMULAS).toContain(science.mathFormula()); }); it('should be in array', function () { var result = science.chemicalElement({ nameOnly: false }); var result_ = result.name + '|' + result.symbol + '|' + result.number; expect(data.chemical_element).toContain(result_); expect(science.chemicalElement()).toMatch(/^[A-Z]{1}[a-z]{1,}$/); }); it('should be in array', function () { expect(data.article).toContain(science.scientificArticle()); }); });