Skip to content

Commit d80b5ab

Browse files
committed
fix: use named export
BREAKING: we no longer use default export
1 parent 59961e9 commit d80b5ab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Command {
3535
* // ['#1','owner/repo#2', ...]
3636
* })
3737
*/
38-
export default (
38+
export const addCommand = (
3939
robot: any,
4040
name: RegExp,
4141
callback: (context: any, issues: RegExpMatchArray) => void

test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import { EventEmitter } from 'events'
33

44
// Ours
5-
import commands from '.'
5+
import { addCommand } from '.'
66

7-
describe('commands', () => {
7+
describe('addCommand', () => {
88
let callback: any
99
let robot: any
1010

@@ -15,7 +15,7 @@ describe('commands', () => {
1515
beforeEach(() => {
1616
callback = jest.fn()
1717
robot = new EventEmitter()
18-
commands(robot, /foo(ing)?/, callback)
18+
addCommand(robot, /foo(ing)?/, callback)
1919
})
2020

2121
it('invokes callback and passes issues list', () => {

0 commit comments

Comments
 (0)