chore: prefer const (#865)

This commit is contained in:
Yang Mingshan 2020-03-23 23:11:00 +08:00 committed by GitHub
parent 8adf0d682a
commit 14908f2734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()