import {addURLParam, encodeParam} from "../src/URLUtils"; describe("Test URLUtils", function () { it('encodeParam', function () { chai.expect(encodeParam({a: 'hello', b: 23, c: null})).to.equal('a=hello&b=23&c='); }); it('addURLParam', function () { chai.expect(addURLParam('/', {a: 'hello', b: 2})).to.equal('/?a=hello&b=2'); chai.expect(addURLParam('/?x=2', {a: 'hello', b: 2})).to.equal('/?x=2&a=hello&b=2'); }) })