From: Yang Mingshan Date: Mon, 23 Mar 2020 15:11:00 +0000 (+0800) Subject: chore: prefer const (#865) X-Git-Tag: v3.0.0-alpha.10~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14908f273411eaa089b1d0d537bcd54e96937e50;p=thirdparty%2Fvuejs%2Fcore.git chore: prefer const (#865) --- diff --git a/packages/runtime-core/__tests__/apiWatch.spec.ts b/packages/runtime-core/__tests__/apiWatch.spec.ts index 36db04b199..f42640abc4 100644 --- a/packages/runtime-core/__tests__/apiWatch.spec.ts +++ b/packages/runtime-core/__tests__/apiWatch.spec.ts @@ -112,8 +112,8 @@ describe('api: watch', () => { let dummy watch([() => state.count, status] as const, (vals, oldVals) => { dummy = [vals, oldVals] - let [count] = vals - let [, oldStatus] = oldVals + const [count] = vals + const [, oldStatus] = oldVals // assert types count + 1 oldStatus === true @@ -412,7 +412,7 @@ describe('api: watch', () => { it('warn and not respect deep option when using effect', async () => { const arr = ref([1, [2]]) - let spy = jest.fn() + const spy = jest.fn() watchEffect( () => { spy()