UNPKG

node-elizabeth

Version:
26 lines (20 loc) 758 B
'use strict'; var _providers = require('../providers.js'); var _transport = require('../locales/int/transport.js'); var transport = new _providers.Transport(); var code = new _providers.Code(); describe('Test transport provider', function () { it('should be in array', function () { expect(_transport.CARS).toContain(transport.car()); }); it('should be formated string', function () { var result = transport.truck().split('-'); expect(_transport.TRUCKS).toContain(result[0]); expect(result[1]).toMatch(/^[0-9]{4} [A-Z]{2}/); }); it('should be formated', function () { var result = transport.airplane().split(' '); expect(_transport.AIRPLANES).toContain(result[0]); expect(result[1]).toMatch(/^[0-9]{3}/); }); });