Skip to content

Commit

Permalink
test: clarify test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Oct 24, 2017
1 parent e9234ae commit 48867f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/help.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ suite('help', () => {
});

['--help', '-h'].forEach((option) => {
test(`with '${option}' option`, async () => {
test(`with "${option}" option`, async () => {
const { stdout, stderr } = await exec(option)
assert(stdout.includes(HELP), stdout)
assert(stderr === '')
Expand Down
12 changes: 6 additions & 6 deletions test/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ suite('init', () => {
await fs.remove(workDir)
})

test('update package.json', async () => {
test('update "package.json"', async () => {
await exec('init')
const pkg = await fs.readJson(packageJson)

Expand Down Expand Up @@ -67,7 +67,7 @@ suite('init', () => {
})
})

test('update package.json without fields', async () => {
test('update "package.json" without fields', async () => {
await fs.writeJson(packageJson, {})
await exec('init')
const pkg = await fs.readJson(packageJson)
Expand All @@ -77,15 +77,15 @@ suite('init', () => {
assert('standard-version' in pkg)
})

test('copy .editorconfig', async () => {
test('copy ".editorconfig"', async () => {
await exec('init')

const original = await fs.readFile(path.join(originalDir, '.editorconfig'), 'utf8')
const copy = await fs.readFile(path.join(workDir, '.editorconfig'), 'utf8')
assert(original === copy)
})

test('write .eslintrc.js', async () => {
test('write ".eslintrc.js"', async () => {
await exec('init')

const wrote = await fs.readFile(path.join(workDir, '.eslintrc.js'), 'utf8')
Expand All @@ -96,7 +96,7 @@ suite('init', () => {
`)
})

test('write commitlint.config.js', async () => {
test('write "commitlint.config.js"', async () => {
await exec('init')

const wrote = await fs.readFile(path.join(workDir, 'commitlint.config.js'), 'utf8')
Expand All @@ -106,7 +106,7 @@ suite('init', () => {
`)
})

test('error', async () => {
test('throw error', async () => {
await fs.remove(packageJson)
const error = await assertThrows(() => exec('init'))
const { code, stdout, stderr } = error
Expand Down
2 changes: 1 addition & 1 deletion test/version.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ suite('version', () => {
const version = process.env.npm_package_version;

['--version', '-v'].forEach((option) => {
test(`with '${option}' option`, async () => {
test(`with "${option}" option`, async () => {
const { stdout, stderr } = await exec(option)
assert(stdout.trim() === version)
assert(stderr === '')
Expand Down

0 comments on commit 48867f2

Please sign in to comment.