Skip to content

Commit

Permalink
Fix CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 17, 2019
1 parent 47bcc35 commit 41cd36e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/options/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { env } from 'process'

import { validate } from 'jest-validate'
import isCi from 'is-ci'

Expand Down Expand Up @@ -45,7 +47,7 @@ const validateOpts = function({ opts }) {
}

const DEFAULT_OPTS = {
verbose: isCi,
verbose: isCi && env.GULP_EXECA_TEST !== 'true',
}

const EXAMPLE_OPTS = {
Expand Down
4 changes: 1 addition & 3 deletions test/helpers/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ const getExecaOpts = function({
// `INPUT`, which is a JSON object.
const input = JSON.stringify({ command, opts, buffer, read })

// The `verbose` option depends on the `CI` variable. We ensure tests are
// predictable regardless on whether they are run in CI.
const execaEnv = { INPUT: input, CI: '', ...env }
const execaEnv = { INPUT: input, GULP_EXECA_TEST: 'true', ...env }
return { reject: false, env: execaEnv, ...execaOpts }
}
1 change: 0 additions & 1 deletion test/verbose.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { METHODS } from './helpers/methods.js'
testEach(
METHODS,
[
{ execaOpts: { env: { CI: '1' } } },
{ opts: { verbose: false } },
{ opts: { verbose: true } },
{ opts: { echo: false, verbose: false } },
Expand Down

0 comments on commit 41cd36e

Please sign in to comment.