mirror of
https://github.com/WhitestormJS/whs.js.git
synced 2026-01-25 16:08:01 +00:00
22 lines
376 B
JavaScript
22 lines
376 B
JavaScript
import test from 'ava';
|
|
import * as WHS from '../../build/whitestorm.js';
|
|
|
|
const app = new WHS.App();
|
|
const loop = new WHS.Loop(() => {}, false);
|
|
|
|
app.start();
|
|
|
|
test('.start()', t => {
|
|
loop.start(app);
|
|
t.true(loop.enabled);
|
|
});
|
|
|
|
test('.stop()', t => {
|
|
loop.stop(app);
|
|
t.false(loop.enabled);
|
|
});
|
|
|
|
test('.execute()', t => {
|
|
new WHS.Loop(() => t.pass()).execute();
|
|
});
|