brazilian-cities
Version:
TypeScript NPM module bootstrap
31 lines (30 loc) • 977 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("./index");
describe('states-and-cities', () => {
it('should have 27 states', () => {
var states = index_1.allStates();
expect(states).not.toBeNull();
expect(states.length).toBe(27);
});
var states = index_1.allStates();
states.forEach(function (state) {
eachState(state);
});
function eachState(state) {
it(`should state ${state.label} has ibdgeCod`, function () {
expect(state.ibgeCod).toBeTruthy();
});
}
var cities = index_1.allCities();
cities.forEach(function (city) {
eachCity(city);
});
function eachCity(city) {
it(`should city ${city.label} has ddd, ibdgeCod and ansArea`, function () {
expect(city.ddd).toBeTruthy();
expect(city.ibgeCod).toBeTruthy();
expect(city.ansArea).toBeTruthy();
});
}
});