Skip to content

Commit 3affc42

Browse files
committed
test: use CanvasDrawer.drawCustomDecoration
1 parent 5b4e5e9 commit 3affc42

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/minimap-element-spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ describe('MinimapElement', () => {
450450
})
451451

452452
it('renders the visible custom foreground decorations', () => {
453-
spyOn(minimapElement, 'drawCustomDecoration').andCallThrough()
453+
spyOn(minimapElement.CanvasDrawer, 'drawCustomDecoration').andCallThrough()
454454

455455
const renderRoutine = jasmine.createSpy('renderRoutine')
456456

@@ -471,16 +471,16 @@ describe('MinimapElement', () => {
471471
runs(() => {
472472
nextAnimationFrame()
473473

474-
expect(minimapElement.drawCustomDecoration).toHaveBeenCalled()
475-
expect(minimapElement.drawCustomDecoration.calls.length).toEqual(4)
474+
expect(minimapElement.CanvasDrawer.drawCustomDecoration).toHaveBeenCalled()
475+
expect(minimapElement.CanvasDrawer.drawCustomDecoration.calls.length).toEqual(4)
476476

477477
expect(renderRoutine).toHaveBeenCalled()
478478
expect(renderRoutine.calls.length).toEqual(4)
479479
})
480480
})
481481

482482
it('renders the visible custom background decorations', () => {
483-
spyOn(minimapElement, 'drawCustomDecoration').andCallThrough()
483+
spyOn(minimapElement.CanvasDrawer, 'drawCustomDecoration').andCallThrough()
484484

485485
const renderRoutine = jasmine.createSpy('renderRoutine')
486486

@@ -501,8 +501,8 @@ describe('MinimapElement', () => {
501501
runs(() => {
502502
nextAnimationFrame()
503503

504-
expect(minimapElement.drawCustomDecoration).toHaveBeenCalled()
505-
expect(minimapElement.drawCustomDecoration.calls.length).toEqual(4)
504+
expect(minimapElement.CanvasDrawer.drawCustomDecoration).toHaveBeenCalled()
505+
expect(minimapElement.CanvasDrawer.drawCustomDecoration.calls.length).toEqual(4)
506506

507507
expect(renderRoutine).toHaveBeenCalled()
508508
expect(renderRoutine.calls.length).toEqual(4)

0 commit comments

Comments
 (0)