chore: prefer const (#865)
This commit is contained in:
parent
8adf0d682a
commit
14908f2734
@ -112,8 +112,8 @@ describe('api: watch', () => {
|
|||||||
let dummy
|
let dummy
|
||||||
watch([() => state.count, status] as const, (vals, oldVals) => {
|
watch([() => state.count, status] as const, (vals, oldVals) => {
|
||||||
dummy = [vals, oldVals]
|
dummy = [vals, oldVals]
|
||||||
let [count] = vals
|
const [count] = vals
|
||||||
let [, oldStatus] = oldVals
|
const [, oldStatus] = oldVals
|
||||||
// assert types
|
// assert types
|
||||||
count + 1
|
count + 1
|
||||||
oldStatus === true
|
oldStatus === true
|
||||||
@ -412,7 +412,7 @@ describe('api: watch', () => {
|
|||||||
|
|
||||||
it('warn and not respect deep option when using effect', async () => {
|
it('warn and not respect deep option when using effect', async () => {
|
||||||
const arr = ref([1, [2]])
|
const arr = ref([1, [2]])
|
||||||
let spy = jest.fn()
|
const spy = jest.fn()
|
||||||
watchEffect(
|
watchEffect(
|
||||||
() => {
|
() => {
|
||||||
spy()
|
spy()
|
||||||
|
Loading…
Reference in New Issue
Block a user