()
| 41 | } |
| 42 | |
| 43 | function createFollower () |
| 44 | { |
| 45 | var addCounterResult = createMockTween(true, false); |
| 46 | |
| 47 | var follower = Object.assign({}, PathFollower); |
| 48 | |
| 49 | follower.x = 0; |
| 50 | follower.y = 0; |
| 51 | follower.rotation = 0; |
| 52 | follower.path = null; |
| 53 | follower.pathTween = null; |
| 54 | follower.pathOffset = null; |
| 55 | follower.pathVector = null; |
| 56 | follower.pathDelta = null; |
| 57 | follower.pathConfig = null; |
| 58 | follower.rotateToPath = false; |
| 59 | follower.pathRotationOffset = 0; |
| 60 | follower._prevDirection = TWEEN_CONST.PLAYING_FORWARD; |
| 61 | |
| 62 | follower.setPosition = vi.fn(function (x, y) |
| 63 | { |
| 64 | follower.x = x; |
| 65 | follower.y = y; |
| 66 | }); |
| 67 | |
| 68 | follower.scene = { |
| 69 | sys: { |
| 70 | tweens: { |
| 71 | addCounter: vi.fn(function () { return addCounterResult; }) |
| 72 | } |
| 73 | } |
| 74 | }; |
| 75 | |
| 76 | follower._addCounterResult = addCounterResult; |
| 77 | |
| 78 | return follower; |
| 79 | } |
| 80 | |
| 81 | describe('PathFollower', function () |
| 82 | { |
no test coverage detected
searching dependent graphs…