Skip to content

Commit

Permalink
Merge pull request #227 from WhitestormJS/#218
Browse files Browse the repository at this point in the history
PR to Moves all existing tests close to src #218
  • Loading branch information
sasha240100 authored Apr 1, 2017
2 parents 6306f7d + 36ececa commit a455633
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as WHS from '../src/index';
import * as WHS from '../../index';
import {Mesh} from 'three';

const meshes = [
Expand Down
2 changes: 1 addition & 1 deletion test/core/App.spec.js → src/core/__tests__/App.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as WHS from '../../src/index';
import * as WHS from '../../index';

/*
* Ignored methods:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as WHS from '../../src/index';
import * as WHS from '../../index';

/*
* Ignored methods:
Expand Down
2 changes: 1 addition & 1 deletion test/core/Loop.spec.js → src/core/__tests__/Loop.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as WHS from '../../src/index';
import * as WHS from '../index';

const app = new WHS.App();
const loop = new WHS.Loop(() => {}, false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as WHS from '../../src/index';
import * as WHS from '../../index';

/*
* Ignored methods:
Expand Down Expand Up @@ -41,7 +41,7 @@ test('.set()', () => {
expect(manager.store.overwritable[0]).toBe('newValue');
});

test('.update()', async () => {
test('.update()', () => {
const update = new Promise((resolve, reject) => {
manager.update({
overwritable: () => {
Expand All @@ -54,7 +54,7 @@ test('.update()', async () => {

manager.set('overwritable', 'check update');

expect(await update).toBeTruthy();
expect(update).toBeTruthy();
});

test('.has()', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './polyfill';
import * as WHS from '../src/index';
import {FogModule} from '../src/modules/app/FogModule';
import '../../polyfill';
import * as WHS from '../../index';
import {FogModule} from '../app/FogModule';
import gl from 'gl';

const app = new WHS.App();
Expand Down Expand Up @@ -40,7 +40,6 @@ test('VirtualMouseModule', () => {
modules.mouse = new WHS.app.VirtualMouseModule();
});


// TODO move Modules tests into individual specs
const defaultFog = new FogModule();
test('FogModule', () => {
Expand Down
6 changes: 6 additions & 0 deletions src/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import present from 'present';

export const system = {
window: typeof window === 'undefined' ? global : window
};

global.performance = {
now: present
};
5 changes: 0 additions & 5 deletions test/polyfill.js

This file was deleted.

0 comments on commit a455633

Please sign in to comment.