Skip to content

Commit a455633

Browse files
authored
Merge pull request #227 from WhitestormJS/#218
PR to Moves all existing tests close to src #218
2 parents 6306f7d + 36ececa commit a455633

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

test/components.spec.js src/components/__tests__/components.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as WHS from '../src/index';
1+
import * as WHS from '../../index';
22
import {Mesh} from 'three';
33

44
const meshes = [

test/core/App.spec.js src/core/__tests__/App.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as WHS from '../../src/index';
1+
import * as WHS from '../../index';
22

33
/*
44
* Ignored methods:

test/core/Component.spec.js src/core/__tests__/Component.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as WHS from '../../src/index';
1+
import * as WHS from '../../index';
22

33
/*
44
* Ignored methods:

test/core/Loop.spec.js src/core/__tests__/Loop.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as WHS from '../../src/index';
1+
import * as WHS from '../index';
22

33
const app = new WHS.App();
44
const loop = new WHS.Loop(() => {}, false);

test/core/ModuleManager.spec.js src/core/__tests__/ModuleManager.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as WHS from '../../src/index';
1+
import * as WHS from '../../index';
22

33
/*
44
* Ignored methods:
@@ -41,7 +41,7 @@ test('.set()', () => {
4141
expect(manager.store.overwritable[0]).toBe('newValue');
4242
});
4343

44-
test('.update()', async () => {
44+
test('.update()', () => {
4545
const update = new Promise((resolve, reject) => {
4646
manager.update({
4747
overwritable: () => {
@@ -54,7 +54,7 @@ test('.update()', async () => {
5454

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

57-
expect(await update).toBeTruthy();
57+
expect(update).toBeTruthy();
5858
});
5959

6060
test('.has()', () => {

test/modules.spec.js src/modules/__tests__/modules.spec.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import './polyfill';
2-
import * as WHS from '../src/index';
3-
import {FogModule} from '../src/modules/app/FogModule';
1+
import '../../polyfill';
2+
import * as WHS from '../../index';
3+
import {FogModule} from '../app/FogModule';
44
import gl from 'gl';
55

66
const app = new WHS.App();
@@ -40,7 +40,6 @@ test('VirtualMouseModule', () => {
4040
modules.mouse = new WHS.app.VirtualMouseModule();
4141
});
4242

43-
4443
// TODO move Modules tests into individual specs
4544
const defaultFog = new FogModule();
4645
test('FogModule', () => {

src/polyfill.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import present from 'present';
2+
13
export const system = {
24
window: typeof window === 'undefined' ? global : window
35
};
6+
7+
global.performance = {
8+
now: present
9+
};

test/polyfill.js

-5
This file was deleted.

0 commit comments

Comments
 (0)