Skip to content

Commit

Permalink
feat(jest): 100% coverage for store/meta/mutations (#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
drepram authored Apr 15, 2022
1 parent dba09c6 commit 7db1218
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions store/meta/mutations.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { MetaState } from './types'
import * as meta from '~/store/meta/mutations'

describe('', () => {
let inst: any
const state: MetaState = {
title: 'empty title',
}

beforeEach(() => {
inst = meta.default
})

it('should toggle media incoming call', () => {
const localStateForUnitTest = { ...state }
inst.setTitle(localStateForUnitTest, 'example title')

expect(localStateForUnitTest).toMatchObject({
title: 'example title',
})
})
})

0 comments on commit 7db1218

Please sign in to comment.