mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-01 13:39:49 +08:00
Create param2Obj.spec.js
param2Obj test
This commit is contained in:
parent
ff9f45e6dd
commit
ceb70e95f6
13
tests/unit/utils/param2Obj.spec.js
Normal file
13
tests/unit/utils/param2Obj.spec.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { param2Obj } from '@/utils/index.js'
|
||||||
|
describe('Utils:param2Obj', () => {
|
||||||
|
const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA=='
|
||||||
|
|
||||||
|
it('param2Obj test', () => {
|
||||||
|
expect(param2Obj(url)).toEqual({
|
||||||
|
name: 'bill',
|
||||||
|
age: '29',
|
||||||
|
sex: '1',
|
||||||
|
field: window.btoa('test')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user