From: MonsterPi <43134418+MonsterPi13@users.noreply.github.com> Date: Fri, 17 Feb 2023 09:56:08 +0000 (+0800) Subject: test: modify test case (#1703) X-Git-Tag: v4.2.0~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14bd76a9815f7c7f682c3542ffb84f829a666962;p=thirdparty%2Fvuejs%2Frouter.git test: modify test case (#1703) --- diff --git a/packages/router/__tests__/scrollBehavior.spec.ts b/packages/router/__tests__/scrollBehavior.spec.ts index 96b5dd1c..3e1dd70a 100644 --- a/packages/router/__tests__/scrollBehavior.spec.ts +++ b/packages/router/__tests__/scrollBehavior.spec.ts @@ -70,7 +70,7 @@ describe('scrollBehavior', () => { it('scrolls to a position', () => { scrollToPosition({ left: 10, top: 100 }) expect(getElementById).not.toHaveBeenCalled() - expect(getElementById).not.toHaveBeenCalled() + expect(querySelector).not.toHaveBeenCalled() expect(scrollTo).toHaveBeenCalledWith({ left: 10, top: 100, @@ -81,7 +81,7 @@ describe('scrollBehavior', () => { it('scrolls to a partial position top', () => { scrollToPosition({ top: 10 }) expect(getElementById).not.toHaveBeenCalled() - expect(getElementById).not.toHaveBeenCalled() + expect(querySelector).not.toHaveBeenCalled() expect(scrollTo).toHaveBeenCalledWith({ top: 10, behavior: undefined, @@ -91,7 +91,7 @@ describe('scrollBehavior', () => { it('scrolls to a partial position left', () => { scrollToPosition({ left: 10 }) expect(getElementById).not.toHaveBeenCalled() - expect(getElementById).not.toHaveBeenCalled() + expect(querySelector).not.toHaveBeenCalled() expect(scrollTo).toHaveBeenCalledWith({ left: 10, behavior: undefined,