Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions test/commit-msg.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
var assert = require('assert');
var exec = require('child_process').execSync;

var utils = require('./_utils.js');
var SAMPLE_REPO_LOCATION = utils.SAMPLE_REPO_LOCATION;

describe('commit-msg', function () {
before(function () {
utils.setup({
'githook:commit-msg': 'node -e "console.log(process.argv);"'
});
});
after(utils.teardown);

it('should ', function () {
var commitResult;

exec(
'git add sample-file.txt',
{ cwd: SAMPLE_REPO_LOCATION }
);

commitResult = exec(
'git commit -m "testing commit-msg"',
{ cwd: SAMPLE_REPO_LOCATION }
)
.toString()
.trim();

assert.equal(commitResult, '');
});
});