'use strict';

import test from 'ava';

process.env.test = true;


const { Event } = require('../index');

test('event', async t => {
  let myEvent = new Event('nonsense_id');
  await myEvent.init().then((evt) => {
    t.is(evt.races.length, 1);
  });
});


const { User } = require('../index');

test('user', async t => {
  let user = new User('1234');
  await user.initPoints().then((user) => {
    t.is(user.current_club, "Leslie Bike Shop/Bikers Boutique");
  });
});

@@ -36,74 +36,74 @@
 a';%0A
-%0Aprocess.env.test = true;%0A%0A%0Aconst %7B Event %7D = require('../index');
+import %7B Event, User %7D from '../index';%0A%0Aprocess.env.test = true;%0A
 %0A%0Ate
@@ -254,48 +254,8 @@
 );%0A%0A
-%0Aconst %7B User %7D = require('../index');%0A%0A
 test

use single way for loading modules