Something went wrong. Try again.
TypeScript client for accessing TLE Community.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253import 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());});