Skip to content

Commit ab6d1f9

Browse files
committed
test: for resolve output
1 parent 2d4b287 commit ab6d1f9

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

test/test-out-resolve.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import test from 'ava';
2+
import outResolve from '../src/out-resolve';
3+
4+
test('should return function', t => {
5+
t.true(typeof outResolve === 'function');
6+
});
7+
8+
test('only input should return file.ext', t => {
9+
t.is(outResolve('file.ext'), 'file.ext');
10+
});
11+
12+
test('only input should return tmp/file.ext', t => {
13+
t.is(outResolve('tmp/file.ext'), 'tmp/file.ext');
14+
});
15+
16+
test('input file and output file should return output.ext', t => {
17+
t.is(outResolve('file.ext', 'output.ext'), 'output.ext');
18+
});
19+
20+
test('input file and output folder should return tmp/file.ext', t => {
21+
t.is(outResolve('file.ext', 'tmp'), 'tmp/file.ext');
22+
});
23+
24+
test('input files and output folder should return tmp/test/*.ext', t => {
25+
t.is(outResolve('test/*.ext', 'tmp'), 'tmp/test/*.ext');
26+
});
27+
28+
test('input files and output file should return output.ext', t => {
29+
t.is(outResolve('test/*', 'output.ext'), 'output.ext');
30+
});
31+
32+
test('input files and output file should return tmp/output.ext', t => {
33+
t.is(outResolve('test/*', 'tmp/output.ext'), 'tmp/output.ext');
34+
});
35+

0 commit comments

Comments
 (0)