Skip to content

Commit

Permalink
fix(Tests): Fix param error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Jover Morales committed Jan 25, 2017
1 parent a2bd4c1 commit 635826c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"config": {
"ghooks": {
"pre-commit": "npm run test:prod",
"pre-commit": "npm run test:prod && npm run build",
"commit-msg": "validate-commit-msg"
},
"commitizen": {
Expand Down
6 changes: 3 additions & 3 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe('shortcutJS', () => {
shortcutJS.subscribe('open', cb)
shortcutJS.processEvent(getMockedEvent(17)) // ctrl
shortcutJS.processEvent(getMockedEvent(65)) // a
shortcutJS.processActionCombos()
shortcutJS.processActionCombos(getMockedEvent(65))

expect(cb).toBeCalled()
})
Expand All @@ -223,7 +223,7 @@ describe('shortcutJS', () => {
shortcutJS.loadFromJson(actionJson)
shortcutJS.subscribe('open', cb)
shortcutJS.processEvent(getMockedEvent(65)) // a
shortcutJS.processActionCombos()
shortcutJS.processActionCombos(getMockedEvent(65))

expect(cb).not.toBeCalled()
})
Expand All @@ -233,7 +233,7 @@ describe('shortcutJS', () => {
shortcutJS.subscribe('open', cb)
shortcutJS.keyMap.set(65, true)
shortcutJS.keyMap.set(17, true)
shortcutJS.processActionCombos()
shortcutJS.processActionCombos(getMockedEvent(65))

expect(console.group).toHaveBeenCalledTimes(1)
expect(console.log).toHaveBeenCalledTimes(3)
Expand Down
17 changes: 17 additions & 0 deletions tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es2016", "dom"],
"noImplicitAny": false,
"sourceMap": false,
"moduleResolution": "node",
"typeRoots": [
"node_modules/@types"
]
},
"exclude": [
"test",
"node_modules"
]
}

0 comments on commit 635826c

Please sign in to comment.