Files
30-seconds-of-code/test6/URLJoin/URLJoin.test.js
Angelos Chalaris 5afe81452a Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
2018-06-18 14:18:25 +03:00

11 lines
549 B
JavaScript

const expect = require('expect');
const URLJoin = require('./URLJoin.js');
test('Testing URLJoin', () => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
expect(typeof URLJoin === 'function').toBeTruthy();
expect(URLJoin('http://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo')).toBe('http://www.google.com/a/b/cd?foo=123&bar=foo');
expect(URLJoin('file://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo')).toBe('file:///www.google.com/a/b/cd?foo=123&bar=foo');
});