Skip to content

Commit

Permalink
chore: spelling improvements EventEmitter.test (#2839)
Browse files Browse the repository at this point in the history
  • Loading branch information
langz authored Nov 2, 2023
1 parent bcb3b9a commit f650bb7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('EventEmitter', () => {
jest.resetAllMocks()
})

it('should contain a listen fcuntion', () => {
it('should contain a listen function', () => {
expect(typeof instanceA.listen).toBe('function')
})

Expand All @@ -29,13 +29,13 @@ describe('EventEmitter', () => {
expect(instanceB.listeners).toHaveLength(1)
})

it('should not emmit listeners on data set', () => {
it('should not emit listeners on data set', () => {
instanceA.set({ foo: 'bar' })
expect(listenerA).toHaveBeenCalledTimes(0)
expect(listenerB).toHaveBeenCalledTimes(0)
})

it('should merge data at once dimention', () => {
it('should merge data at one dimension', () => {
instanceA.set({ foo: 'bar' })
expect(instanceA.get()).toMatchObject(
expect.objectContaining({ foo: 'bar' })
Expand All @@ -53,7 +53,7 @@ describe('EventEmitter', () => {
)
})

it('should emmit listeners on data update', () => {
it('should emit listeners on data update', () => {
const data = { foo: 'bar' }

instanceA.update(data)
Expand All @@ -73,7 +73,7 @@ describe('EventEmitter', () => {
expect(listenerB).toHaveBeenCalledTimes(1)
})

it('should emmit a new added listener', () => {
it('should emit a new added listener', () => {
const listenerC = jest.fn((data) => data)
instanceA.listen(listenerC)
instanceA.update({ foo: 'bar' })
Expand Down

0 comments on commit f650bb7

Please sign in to comment.