Skip to content

Commit

Permalink
Reuse callback type, trim test down slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Krueger committed Aug 2, 2017
1 parent 85e2a15 commit 35dee50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/mixins/notify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Emitter from '../emitter'

type callback = (input?: mixed) => void
import Emitter, { callback } from '../emitter'

export default function notify(superclass: Emitter): Emitter {
return class extends superclass {
Expand Down
4 changes: 1 addition & 3 deletions src/mixins/notify.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import Emitter from '../emitter'
import notify from './notify'

class E extends notify(Emitter) {}

describe('notify', function() {
beforeEach(() => {
this.emitter = new E()
this.emitter = new (notify(Emitter))()
})

it('should return a new constructor wrapping the argument', () => {
Expand Down

0 comments on commit 35dee50

Please sign in to comment.