mirror of
https://github.com/WhitestormJS/whs.js.git
synced 2026-01-25 16:08:01 +00:00
21 lines
371 B
JavaScript
21 lines
371 B
JavaScript
import * as WHS from '../../src/index';
|
|
|
|
const app = new WHS.App();
|
|
const loop = new WHS.Loop(() => {}, false);
|
|
|
|
app.start();
|
|
|
|
test('.start()', () => {
|
|
loop.start(app);
|
|
expect(loop.enabled).toBeTruthy();
|
|
});
|
|
|
|
test('.stop()', () => {
|
|
loop.stop(app);
|
|
expect(loop.enabled).toBeFalsy();
|
|
});
|
|
|
|
test('.execute()', (done) => {
|
|
new WHS.Loop(() => done()).execute();
|
|
});
|