@helium/http
Version:
HTTP library for interacting with the Helium blockchain API
29 lines • 1.19 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const City_1 = __importDefault(require("../City"));
const Client_1 = __importDefault(require("../../Client"));
test('create City from HTTP response', () => {
const client = new Client_1.default();
const city = new City_1.default(client, {
short_state: 'CA',
short_country: 'US',
short_city: 'SF',
long_state: 'California',
long_country: 'United States',
long_city: 'San Francisco',
hotspot_count: 228,
city_id: 'c2FuIGZyYW5jaXNjb2NhbGlmb3JuaWF1bml0ZWQgc3RhdGVz',
});
expect(city.shortState).toBe('CA');
expect(city.shortCountry).toBe('US');
expect(city.shortCity).toBe('SF');
expect(city.longState).toBe('California');
expect(city.longCountry).toBe('United States');
expect(city.longCity).toBe('San Francisco');
expect(city.hotspotCount).toBe(228);
expect(city.cityId).toBe('c2FuIGZyYW5jaXNjb2NhbGlmb3JuaWF1bml0ZWQgc3RhdGVz');
});
//# sourceMappingURL=City.spec.js.map