This repository has been archived by the owner on Nov 21, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
55 lines (49 loc) · 2.58 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
'use strict';
var conventionalChangelogCore = require('conventional-changelog-core');
var config = require('./');
var expect = require('chai').expect;
var gitDummyCommit = require('git-dummy-commit');
var shell = require('shelljs');
var through = require('through2');
describe('ember preset', function() {
before(function() {
shell.config.silent = true;
shell.rm('-rf', 'tmp');
shell.mkdir('tmp');
shell.cd('tmp');
shell.mkdir('git-templates');
shell.exec('git init --template=./git-templates');
gitDummyCommit(['Merge pull request #12001 from rwjblue/remove-with-controller', '[CLEANUP beta] Remove {{with}} keyword\'s controller option. Closes #1']);
gitDummyCommit(['Merge pull request #11984 from emberjs/fix-each', '[PERF beta] `@each` should remain a stable node for chains.']);
gitDummyCommit(['Merge pull request #11970 from pixelhandler/ember-rfc-80', '[DOC Release] Make ArrayProxy public']);
gitDummyCommit(['Merge pull request #12010 from duggiefresh/12004-doc-array-methods', '[DOC release] Mark `Ember.Array` methods as public']);
gitDummyCommit(['Merge pull request #12017 from rwjblue/deprecate-render-function', '[BUGFIX release] Deprecate specifying `.render` to views/components.']);
gitDummyCommit(['Merge pull request #11968 from jayphelps/remove-ember-views-component-block-info', '[FEATURE ember-views-component-block-param-info] remove feature info and unflag tests']);
gitDummyCommit(['Merge pull request #1000 from jayphelps/remove-ember-views-component-block-info', '[SECURITY CVE-2014-0013] Ensure primitive value contexts are escaped.']);
gitDummyCommit('Bad commit');
gitDummyCommit('Merge pull request #2000000 from jayphelps/remove-ember-views-component-block-info');
});
it('should work if there is no semver tag', function(done) {
conventionalChangelogCore({
config: config
})
.on('error', function(err) {
done(err);
})
.pipe(through(function(chunk) {
chunk = chunk.toString();
expect(chunk).to.include('[12001]');
expect(chunk).to.include('Remove {{with}} keyword\'s controller option.');
expect(chunk).to.include('Release');
expect(chunk).to.include('### Bug Fixes');
expect(chunk).to.include('### Cleanup');
expect(chunk).to.include('### Features');
expect(chunk).to.include('### Documentation');
expect(chunk).to.include('### Security');
expect(chunk).to.not.include('CLEANUP');
expect(chunk).to.not.include('FEATURE');
expect(chunk).to.not.include('Bad');
done();
}));
});
});