Skip to content

Commit

Permalink
refactor: introduce test/helpers directory (#51)
Browse files Browse the repository at this point in the history
In order to distinguish between test files and test helper files.
  • Loading branch information
ybiquitous authored Nov 15, 2017
1 parent 97d930e commit 321903f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions test/help.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import assert from 'assert'
import assertThrows from './assert-throws'
import exec from './exec'
import { assertThrows, exec } from './helpers'

const HELP = `
cli.js <command>
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions test/helpers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import assertThrows from './assert-throws'
import exec from './exec'

export {
assertThrows,
exec,
}
3 changes: 1 addition & 2 deletions test/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import path from 'path'
import os from 'os'
import fs from 'fs-extra'
import assert from 'assert'
import assertThrows from './assert-throws'
import exec from './exec'
import { assertThrows, exec } from './helpers'

suite('init', () => {
let workDir
Expand Down
2 changes: 1 addition & 1 deletion test/version.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert'
import exec from './exec'
import { exec } from './helpers'

suite('version', () => {
const version = process.env.npm_package_version;
Expand Down

0 comments on commit 321903f

Please sign in to comment.