1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:30:04 +08:00

Add test for web html api

This commit is contained in:
wsdjeg 2017-07-16 04:50:47 +08:00
parent a761d83935
commit dc987e3bcd
2 changed files with 5 additions and 1 deletions

View File

@ -182,7 +182,7 @@ function! s:template.toString() dict abort
return xml
endfunction
function! webapi#xml#createElement(name) abort
function! s:self.createElement(name) abort
let node = deepcopy(s:template)
let node.name = a:name
return node

4
test/api/web/html.vader Normal file
View File

@ -0,0 +1,4 @@
Execute (Test web#http api):
let g:test_api_web_html = SpaceVim#api#import('web#html')
let g:test_api_web_html_paser = g:test_api_web_html.parseURL('spacevim.org')
AssertEqual g:test_api_web_html_paser.child[1].child[21].child[0], 'Home - SpaceVim'