diff options
Diffstat (limited to 'test/index_test.ts')
| -rw-r--r-- | test/index_test.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/index_test.ts b/test/index_test.ts index 31c9495..4a67fe6 100644 --- a/test/index_test.ts +++ b/test/index_test.ts @@ -1,28 +1,28 @@ -import mitt, { Emitter, EventHandlerMap } from '..'; +import nitt, { Emitter, EventHandlerMap } from '..'; import chai, { expect } from 'chai'; import { spy } from 'sinon'; import sinonChai from 'sinon-chai'; chai.use(sinonChai); -describe('mitt', () => { +describe('nitt', () => { it('should default export be a function', () => { - expect(mitt).to.be.a('function'); + expect(nitt).to.be.a('function'); }); it('should accept an optional event handler map', () => { - expect(() => mitt(new Map())).not.to.throw; + expect(() => nitt(new Map())).not.to.throw; const map = new Map(); const a = spy(); const b = spy(); map.set('foo', [a, b]); - const events = mitt<{ foo: undefined }>(map); + const events = nitt<{ foo: undefined }>(map); events.emit('foo'); expect(a).to.have.been.calledOnce; expect(b).to.have.been.calledOnce; }); }); -describe('mitt#', () => { +describe('nitt#', () => { const eventType = Symbol('eventType'); type Events = { foo: unknown; @@ -39,7 +39,7 @@ describe('mitt#', () => { beforeEach(() => { events = new Map(); - inst = mitt(events); + inst = nitt(events); }); describe('properties', () => { |
