Skip to content

Commit

Permalink
✅ Add hook command to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
carloscuesta committed Nov 5, 2019
1 parent cdcf9af commit 88728e2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/commands/__snapshots__/hook.spec.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`hook command should match hook configuration 1`] = `
Object {
"CONTENTS": "#!/bin/sh
# gitmoji as a commit hook
exec < /dev/tty
gitmoji --hook $1
",
"PATH": "/hooks/prepare-commit-msg",
"PERMISSIONS": 509,
}
`;

exports[`hook command should match hook module export 1`] = `
Object {
"create": [Function],
"remove": [Function],
}
`;
16 changes: 16 additions & 0 deletions test/commands/hook.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import hook from '../../src/commands/hook'
import hookConfig from '../../src/commands/hook/hook'

describe('hook command', () => {
it('should match hook module export', () => {
expect(hook).toMatchSnapshot()
})

it('should match hook configuration', () => {
expect(hookConfig).toMatchSnapshot()
})

describe('create hook', () => {})

describe('remove hook', () => {})
})

0 comments on commit 88728e2

Please sign in to comment.