Skip to content

Commit

Permalink
tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVerschueren committed Jan 4, 2016
1 parent 4776f96 commit c10a326
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test('cwd', async t => {

await execa('./cli.js', ['hello.js', 'dest', '--cwd', path.join(t.context.tmp, 'cwd')]);

t.is(read(t.context.tmp, 'cwd/hello.js'), read(path.join(t.context.tmp, 'cwd/dest/hello.js')));
t.is(read(t.context.tmp, 'cwd/hello.js'), read(t.context.tmp, 'cwd/dest/hello.js'));
});

test('keep path structure with flag "--parents"', async t => {
Expand All @@ -38,7 +38,7 @@ test('keep path structure with flag "--parents"', async t => {

await execa('./cli.js', [path.join(t.context.tmp, 'cwd/hello.js'), t.context.tmp, '--parents']);

t.is(read(t.context.tmp, 'cwd/hello.js'), read(path.join(t.context.tmp, t.context.tmp, 'cwd/hello.js')));
t.is(read(t.context.tmp, 'cwd/hello.js'), read(t.context.tmp, t.context.tmp, 'cwd/hello.js'));
});

test('rename filenames but not filepaths', async t => {
Expand All @@ -48,7 +48,7 @@ test('rename filenames but not filepaths', async t => {

await execa('./cli.js', [path.join(t.context.tmp, 'hello.js'), path.join(t.context.tmp, 'dest'), '--rename=hi.js']);

t.is(read(t.context.tmp, 'hello.js'), read(path.join(t.context.tmp, 'dest/hi.js')));
t.is(read(t.context.tmp, 'hello.js'), read(t.context.tmp, 'dest/hi.js'));
});

test('overwrite files by default', async t => {
Expand Down

0 comments on commit c10a326

Please sign in to comment.