UNPKG

@mytmpvpn/mytmpvpn-client

Version:

MyTmpVpn Client Library

20 lines (19 loc) 837 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const appconfig = require("../src/appconfig"); const src_1 = require("../src"); describe('Testing peanutsPack related APIs', () => { const appConfig = appconfig.loadDefaultAppConfig(); const client = (0, src_1.getClientModule)(appConfig.apiUrl); it("should list all peanuts packs", async () => { const peanutsPacks = await client.listPeanutsPacks(); expect(peanutsPacks).toBeDefined(); expect(Object.keys(peanutsPacks).length).toEqual(3); Object.entries(peanutsPacks).forEach(([name, pack]) => { expect(pack.peanuts).toBeDefined(); expect(pack.peanuts).toBeGreaterThan(0); expect(pack.price).toBeDefined; expect(pack.price).toBeGreaterThan(0); }); }); });