Skip to content

Commit

Permalink
test(useTitle): remove unecessary warnings thrown during tests (#2695)
Browse files Browse the repository at this point in the history
  • Loading branch information
clemdee committed Feb 18, 2023
1 parent 83feb7a commit 111892e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/core/useTitle/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { computed, ref } from 'vue-demi'
import { computed, isReadonly, ref } from 'vue-demi'
import { useTitle } from '.'

describe('useTitle', () => {
Expand Down Expand Up @@ -72,16 +72,14 @@ describe('useTitle', () => {
expect(title.value).toEqual('old title')
condition.value = true
expect(title.value).toEqual('new title')
// @ts-expect-error readonly
title.value = ''
expect(isReadonly(title)).toBeTruthy()
})

it('function', () => {
const target = () => 'new title'
const title = useTitle(target)
expect(title.value).toEqual('new title')
// @ts-expect-error readonly
title.value = ''
expect(isReadonly(title)).toBeTruthy()
})
})
})

0 comments on commit 111892e

Please sign in to comment.