Skip to content

Commit

Permalink
Fix isCI import (fixes #699)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 5, 2020
1 parent d678b32 commit 2ae0ccc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const parseJson = require('parse-json');
const parseToml = require('@iarna/toml/parse-string');
const yaml = require('yaml');
const _ = require('lodash');
const { isCI } = require('is-ci');
const isCI = require('is-ci');
const debug = require('debug')('release-it:config');
const defaultConfig = require('../config/release-it.json');
const { getSystemInfo } = require('./util');
Expand Down
7 changes: 7 additions & 0 deletions test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ test('should set CI mode', t => {
t.is(config.isCI, true);
});

test('should detect CI mode', t => {
const isCI = require('is-ci');
const config = new Config();
t.is(config.options.ci, isCI);
t.is(config.isCI, isCI);
});

test('should override --no-npm.publish', t => {
const config = new Config({ npm: { publish: false } });
t.is(config.options.npm.publish, false);
Expand Down

0 comments on commit 2ae0ccc

Please sign in to comment.