From 8c32e418a33bc3923e8710a626902ae2680ba40d Mon Sep 17 00:00:00 2001 From: xuexb Date: Tue, 3 Apr 2018 10:41:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20router=20href=20?= =?UTF-8?q?=E4=B8=AD=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/layui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/layui.js b/test/layui.js index be786c40..a5175731 100644 --- a/test/layui.js +++ b/test/layui.js @@ -55,7 +55,7 @@ describe('layui', function () { it('router querystring', function () { expect(layui.router('#/a=1/b=2/c=')).to.deep.equal($.extend({}, defaultData, { - href: 'a=1/b=2/c=', + href: '/a=1/b=2/c=', search: { a: '1', b: '2', @@ -77,7 +77,7 @@ describe('layui', function () { expect(layui.router('#/name#layui')).to.deep.equal($.extend({}, defaultData, { hash: '#layui', path: ['name'], - href: 'name#layui' + href: '/name#layui' })); expect(layui.router('#/name#layui').hash).to.equal('#layui'); expect(layui.router('#/name#layui=1').hash).to.equal('#layui=1'); @@ -93,7 +93,7 @@ describe('layui', function () { c: '2' }, hash: '#hash', - href: 'a/b/c=2#hash' + href: '/a/b/c=2#hash' }); }); });