test(refactor): cleanup test to use the new UrlMapper

This commit is contained in:
Victor Berchet
2015-06-24 10:27:53 +02:00
parent 0a2f6ddc64
commit b89c0672e6
4 changed files with 87 additions and 106 deletions
@@ -53,11 +53,12 @@ export function main() {
});
describe('relative base url', () => {
it('should add a relative path to the base url',
() => { expect(resolver.resolve('foo/', './bar')).toEqual('foo/bar'); });
it('should add a relative path to the base url', () => {
expect(resolver.resolve('foo/', './bar')).toEqual('foo/bar');
expect(resolver.resolve('foo/baz', './bar')).toEqual('foo/bar');
expect(resolver.resolve('foo/baz', 'bar')).toEqual('foo/bar');
it('should replace the base path',
() => { expect(resolver.resolve('foo/baz', './bar')).toEqual('foo/bar'); });
});
it('should support ".." in the path', () => {
expect(resolver.resolve('foo/baz', '../bar')).toEqual('bar');