Skip to content

Commit

Permalink
Merge pull request #10951 from qmonmert/cleantests
Browse files Browse the repository at this point in the history
Clean tests
  • Loading branch information
murdos authored Sep 22, 2024
2 parents 1d17c26 + 8dc2339 commit afe81b8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LandscapeMiniMapVue } from '@/module/primary/landscape-minimap';
import { mount } from '@vue/test-utils';
import { describe, it, expect, vi, Mock } from 'vitest';
import { describe, it, expect, vi } from 'vitest';
import { wrappedElement } from '../../../WrappedElement';

const buildLandscapeContainer = (): HTMLDivElement => {
Expand All @@ -27,7 +27,7 @@ const buildLandscapeContainer = (): HTMLDivElement => {
describe('MiniMap component', () => {
it('should scroll the landscape container if minimapViewer position has changed', async () => {
const landscapeContainer = buildLandscapeContainer();
(landscapeContainer.scroll as Mock<any, any>) = vi.fn();
landscapeContainer.scroll = vi.fn();

const wrapper = mount(LandscapeMiniMapVue, {
props: { landscapeContainer: landscapeContainer },
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('MiniMap component', () => {
it('should not scroll the landscape container if minimapViewer is not being grabbed', async () => {
const landscapeContainer = buildLandscapeContainer();

(landscapeContainer.scroll as Mock<any, any>) = vi.fn();
landscapeContainer.scroll = vi.fn();

const wrapper = mount(LandscapeMiniMapVue, {
props: { landscapeContainer: landscapeContainer },
Expand Down

0 comments on commit afe81b8

Please sign in to comment.