Skip to content

Commit

Permalink
Split file
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 17, 2019
1 parent 391d8df commit 18889c3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
21 changes: 21 additions & 0 deletions test/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import test from 'ava'

import { testEach } from './helpers/test_each/main.js'
import { snapshotTest } from './helpers/snapshot.js'
import { METHODS } from './helpers/methods.js'

testEach(
METHODS,
[{ command: true }, { command: ' ' }],
(suffix, methodProps, data) =>
test(`Invalid command ${suffix}`, t =>
snapshotTest({ t, methodProps, data })),
)

testEach(
METHODS,
[{ opts: { encoding: 'invalid' } }, { command: 'invalid', read: false }],
(suffix, methodProps, data) =>
test(`Errored command ${suffix}`, t =>
snapshotTest({ t, methodProps, data })),
)
16 changes: 0 additions & 16 deletions test/invalid.js → test/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ import { testEach } from './helpers/test_each/main.js'
import { snapshotTest } from './helpers/snapshot.js'
import { METHODS } from './helpers/methods.js'

testEach(
METHODS,
[{ command: true }, { command: ' ' }],
(suffix, methodProps, data) =>
test(`Invalid command ${suffix}`, t =>
snapshotTest({ t, methodProps, data })),
)

testEach(
METHODS,
[
Expand Down Expand Up @@ -49,11 +41,3 @@ testEach(
test(`Invalid options ${suffix}`, t =>
snapshotTest({ t, methodProps, data })),
)

testEach(
METHODS,
[{ opts: { encoding: 'invalid' } }, { command: 'invalid', read: false }],
(suffix, methodProps, data) =>
test(`Errored command ${suffix}`, t =>
snapshotTest({ t, methodProps, data })),
)

0 comments on commit 18889c3

Please sign in to comment.