|
| 1 | +import { expect } from 'chai'; |
| 2 | + |
| 3 | +import { INTERPOLATION_LINEAR } from '../../../../src/framework/anim/constants.js'; |
1 | 4 | import { AnimController } from '../../../../src/framework/anim/controller/anim-controller.js';
|
2 |
| -import { Entity } from '../../../../src/framework/entity.js'; |
3 |
| -import { AnimComponentBinder } from '../../../../src/framework/components/anim/component-binder.js'; |
| 5 | +import { ANIM_LESS_THAN } from '../../../../src/framework/anim/controller/constants.js'; |
| 6 | +import { AnimCurve } from '../../../../src/framework/anim/evaluator/anim-curve.js'; |
| 7 | +import { AnimData } from '../../../../src/framework/anim/evaluator/anim-data.js'; |
4 | 8 | import { AnimEvaluator } from '../../../../src/framework/anim/evaluator/anim-evaluator.js';
|
5 |
| -import { Application } from '../../../../src/framework/application.js'; |
6 | 9 | import { AnimTrack } from '../../../../src/framework/anim/evaluator/anim-track.js';
|
7 |
| -import { AnimData } from '../../../../src/framework/anim/evaluator/anim-data.js'; |
8 |
| -import { AnimCurve } from '../../../../src/framework/anim/evaluator/anim-curve.js'; |
9 |
| -import { INTERPOLATION_LINEAR } from '../../../../src/framework/anim/constants.js'; |
10 |
| -import { ANIM_LESS_THAN } from '../../../../src/framework/anim/controller/constants.js'; |
11 |
| -import { NullGraphicsDevice } from '../../../../src/platform/graphics/null/null-graphics-device.js'; |
12 |
| - |
13 |
| -import { expect } from 'chai'; |
| 10 | +import { AnimComponentBinder } from '../../../../src/framework/components/anim/component-binder.js'; |
| 11 | +import { Entity } from '../../../../src/framework/entity.js'; |
| 12 | +import { createApp } from '../../../app.mjs'; |
14 | 13 |
|
15 | 14 | describe('AnimController', function () {
|
16 | 15 |
|
17 | 16 | let app;
|
18 | 17 | let controller;
|
19 | 18 |
|
20 | 19 | beforeEach(function () {
|
21 |
| - const canvas = document.createElement('canvas'); |
22 |
| - app = new Application(canvas, { graphicsDevice: new NullGraphicsDevice(canvas) }); |
| 20 | + app = createApp(); |
| 21 | + |
23 | 22 | const states = [
|
24 | 23 | {
|
25 | 24 | name: 'START'
|
@@ -100,7 +99,8 @@ describe('AnimController', function () {
|
100 | 99 | });
|
101 | 100 |
|
102 | 101 | afterEach(function () {
|
103 |
| - app.destroy(); |
| 102 | + app?.destroy(); |
| 103 | + app = null; |
104 | 104 | });
|
105 | 105 |
|
106 | 106 | describe('#constructor', function () {
|
|
0 commit comments