Skip to content

Commit 270cb5c

Browse files
authoredJul 20, 2019
fix: bump tests to release (#656)
* fix: bump tests to release * fix: ignore osome files for coverage
1 parent 2a1a111 commit 270cb5c

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed
 

‎.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ before_script:
1414
- git version
1515
script:
1616
- npm run test
17-
- npm run check-coverage
1817
after_success:
1918
- npm run report-coverage
2019
- npm run semantic-release

‎src/commitizen.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* istanbul ignore file */
12
import * as adapter from './commitizen/adapter';
23
import * as cache from './commitizen/cache';
34
import commit from './commitizen/commit';

‎src/configLoader.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* istanbul ignore file */
12
import findup from './configLoader/findup';
23
import getContent from './configLoader/getContent';
34
import getNormalizedConfig from './configLoader/getNormalizedConfig';

‎src/git.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* istanbul ignore file */
12
import { addPath, addFile } from './git/add';
23
import { commit } from './git/commit';
34
import { init } from './git/init';

‎test/tests/init.js

+24
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,30 @@ describe('init', function () {
155155

156156
});
157157

158+
it('installs an commitizen with includeCommitizen', function () {
159+
160+
this.timeout(config.maxTimeout); // this could take a while
161+
162+
// SETUP
163+
164+
// Add a first adapter
165+
sh.cd(config.paths.endUserRepo);
166+
commitizenInit(sh, config.paths.endUserRepo, 'cz-conventional-changelog', { includeCommitizen: true });
167+
let packageJson = util.getParsedPackageJsonFromPath(config.paths.endUserRepo);
168+
169+
// TEST
170+
expect(packageJson.devDependencies).to.have.property('cz-conventional-changelog');
171+
expect(packageJson.devDependencies).to.have.property('commitizen');
172+
let range = packageJson.devDependencies['cz-conventional-changelog'];
173+
174+
// It should satisfy the requirements of a range
175+
expect(semver.validRange(range)).to.not.equal(null);
176+
177+
// But you CAN increment a single version
178+
expect(semver.inc(range, 'major')).not.to.equal(null);
179+
180+
});
181+
158182
it('installs an adapter with --yarn', function () {
159183

160184
this.timeout(config.maxTimeout); // this could take a while

0 commit comments

Comments
 (0)
Please sign in to comment.