Skip to content

Commit 9a265b3

Browse files
committed
more splat tests
1 parent ca5d813 commit 9a265b3

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
@@ -205,6 +205,12 @@ describe('Path.injectParams', function () {
205205
it('returns the correct path', function () {
206206
expect(Path.injectParams('/a/*/c/*', { splat: [ 'b', 'd' ] })).toEqual('/a/b/c/d');
207207
});
208+
209+
it('complains if not given enough splat values', function () {
210+
expect(function() {
211+
Path.injectParams('/a/*/c/*', { splat: [ 'b' ] });
212+
}).toThrow(Error);
213+
});
208214
});
209215
});
210216

0 commit comments

Comments
 (0)