import Lacuna from './lacuna'; const modules: (keyof Lacuna)[] = [ 'body', 'captcha', 'config', 'empire', 'essentiaVein', 'log', 'server', 'session', 'shipyard', 'spacePort', ]; test('authenticate', async () => { console.info = jest.fn(); const lacuna = new Lacuna(); await lacuna.authenticate( process.env.LACUNA_TEST_EMPIRE_NAME, process.env.LACUNA_TEST_EMPIRE_PASSWORD ); expect(lacuna.session.get()).not.toEqual(''); }); test('buildingFromUrl', () => { const lacuna = new Lacuna(); const pcc = lacuna.buildingFromUrl('planetarycommand'); expect(pcc).toBeDefined(); expect(pcc.module).toBe('planetarycommand'); const development = lacuna.buildingFromUrl('/development'); expect(development).toBeDefined(); expect(development.module).toBe('development'); }); test('version', () => { const lacuna = new Lacuna(); expect(lacuna.version).toBeDefined(); }); test('modules', () => { const lacuna = new Lacuna(); modules.forEach((module) => expect(lacuna[module]).toBeDefined()); });