Skip to content

Commit ca5d813

Browse files
committed
add single splat test
1 parent 4044b14 commit ca5d813

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/utils/__tests__/Path-test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ describe('Path.injectParams', function () {
195195
});
196196
});
197197

198+
describe('when a pattern has one splat', function () {
199+
it('returns the correct path', function () {
200+
expect(Path.injectParams('/a/*/d', { splat: 'b/c' })).toEqual('/a/b/c/d');
201+
});
202+
});
203+
198204
describe('when a pattern has multiple splats', function () {
199205
it('returns the correct path', function () {
200206
expect(Path.injectParams('/a/*/c/*', { splat: [ 'b', 'd' ] })).toEqual('/a/b/c/d');

0 commit comments

Comments
 (0)