This repository has been archived by the owner on Feb 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): able to have two files, separator works for interactive
Add test for cli as it is getting more complicated. Improve cli style. Use is-text-path to check file paths. Improve docs and cli help
- Loading branch information
Showing
9 changed files
with
123 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
'use strict'; | ||
var expect = require('chai').expect; | ||
var readFileSync = require('fs').readFileSync; | ||
var spawn = require('child_process').spawn; | ||
var concat = require('concat-stream'); | ||
|
||
var cliPath = './cli.js'; | ||
|
||
describe('cli', function() { | ||
it('should parse commits in a file', function(done) { | ||
var cp = spawn(cliPath, ['test/fixtures/log.txt']); | ||
|
||
cp.stdout | ||
.pipe(concat(function(chunk) { | ||
var expected = readFileSync('test/expected/output1.txt', 'utf-8'); | ||
|
||
expect(chunk.toString()).to.equal(expected); | ||
done(); | ||
})); | ||
}); | ||
|
||
it('should work with a separator', function(done) { | ||
var cp = spawn(cliPath, ['test/fixtures/log2.txt', '===']); | ||
|
||
cp.stdout | ||
.pipe(concat(function(chunk) { | ||
var expected = readFileSync('test/expected/output2.txt', 'utf-8'); | ||
|
||
expect(chunk.toString()).to.equal(expected); | ||
done(); | ||
})); | ||
}); | ||
|
||
it('should work with two files', function(done) { | ||
var cp = spawn(cliPath, ['test/fixtures/log.txt', 'test/fixtures/log2.txt', '===']); | ||
|
||
cp.stdout | ||
.pipe(concat(function(chunk) { | ||
var expected = readFileSync('test/expected/output_both.txt', 'utf-8'); | ||
|
||
expect(chunk.toString()).to.equal(expected); | ||
done(); | ||
})); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
{"hash":"9b1aff905b638aa274a5fc8f88662df446d374bd","header":"feat(ngMessages): provide support for dynamic message resolution","body":"Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error.","footer":"BREAKING CHANGE: The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive.\nCloses #10036\nCloses #9338","breaks":{"BREAKING CHANGE":"The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive."},"closes":[10036,9338],"type":"feat","scope":"ngMessages","subject":"provide support for dynamic message resolution"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ | ||
{"hash":"2d0eda10e43f6b079b531c507282fad082ea0762","header":"docs(ngMessageExp): split ngMessage docs up to show its alias more clearly","body":"","footer":"","breaks":{},"closes":[],"type":"docs","scope":"ngMessageExp","subject":"split ngMessage docs up to show its alias more clearly"} | ||
, | ||
{"hash":"4374f892c6fa4af6ba1f2ed47c5f888fdb5fadc5","header":"fix($animate): applyStyles from options on leave","body":"","footer":"Closes #10068","breaks":{},"closes":[10068],"type":"fix","scope":"$animate","subject":"applyStyles from options on leave"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{"hash":"9b1aff905b638aa274a5fc8f88662df446d374bd","header":"feat(ngMessages): provide support for dynamic message resolution","body":"Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error.","footer":"BREAKING CHANGE: The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive.\nCloses #10036\nCloses #9338","breaks":{"BREAKING CHANGE":"The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive."},"closes":[10036,9338],"type":"feat","scope":"ngMessages","subject":"provide support for dynamic message resolution"} | ||
] | ||
[ | ||
{"hash":"2d0eda10e43f6b079b531c507282fad082ea0762","header":"docs(ngMessageExp): split ngMessage docs up to show its alias more clearly","body":"","footer":"","breaks":{},"closes":[],"type":"docs","scope":"ngMessageExp","subject":"split ngMessage docs up to show its alias more clearly"} | ||
, | ||
{"hash":"4374f892c6fa4af6ba1f2ed47c5f888fdb5fadc5","header":"fix($animate): applyStyles from options on leave","body":"","footer":"Closes #10068","breaks":{},"closes":[10068],"type":"fix","scope":"$animate","subject":"applyStyles from options on leave"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
9b1aff905b638aa274a5fc8f88662df446d374bd | ||
|
||
feat(ngMessages): provide support for dynamic message resolution | ||
|
||
Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error. | ||
|
||
BREAKING CHANGE: The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive. | ||
|
||
Closes #10036 | ||
Closes #9338 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
2d0eda10e43f6b079b531c507282fad082ea0762 | ||
|
||
docs(ngMessageExp): split ngMessage docs up to show its alias more clearly | ||
=== | ||
4374f892c6fa4af6ba1f2ed47c5f888fdb5fadc5 | ||
|
||
fix($animate): applyStyles from options on leave | ||
|
||
Closes #10068 |