Skip to content

Commit 9cc8aca

Browse files
committed
Make tests more explicit
1 parent 7c7b6d3 commit 9cc8aca

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import test from 'ava';
22

3-
import path from 'path';
4-
53
import { rollup } from 'rollup';
64
import alias from '../dist/rollup-plugin-alias';
75

@@ -15,11 +13,11 @@ test(t =>
1513
'./numberFolder': './folder',
1614
})],
1715
}).then(stats => {
18-
t.is(path.basename(stats.modules[0].id), 'nonAliased.js');
19-
t.is(path.basename(stats.modules[1].id), 'aliasMe.js');
20-
t.is(path.basename(stats.modules[2].id), 'localAliasMe.js');
21-
t.is(path.basename(stats.modules[3].id), 'anotherNumber.js');
22-
t.is(path.basename(stats.modules[4].id), 'index.js');
16+
t.is(stats.modules[0].id.endsWith('/files/nonAliased.js'), true);
17+
t.is(stats.modules[1].id.endsWith('/files/aliasMe.js'), true);
18+
t.is(stats.modules[2].id.endsWith('/files/localAliasMe.js'), true);
19+
t.is(stats.modules[3].id.endsWith('/files/folder/anotherNumber.js'), true);
20+
t.is(stats.modules[4].id.endsWith('/files/index.js'), true);
2321
t.is(stats.modules.length, 5);
2422
})
2523
);

0 commit comments

Comments
 (0)