Skip to content

Commit

Permalink
test(cases): add more special test cases to html.js
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Nov 4, 2019
1 parent 457bb58 commit 6fdf2ea
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions test/cases/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var isPhantomJS =
: false;

module.exports = [
// high-level tags
// html tags
{
name: 'empty html',
data: '<html></html>',
Expand Down Expand Up @@ -47,18 +47,31 @@ module.exports = [
skip: isPhantomJS
},

// head and body tags
{
name: 'unclosed head',
data: '<head>'
},
{
name: 'empty head',
data: '<head></head>'
},
{
name: 'head with title',
data: '<head><title>Page</title></head>'
data: '<head><title>Text</title></head>'
},
{
name: 'empty head and body',
data: '<head></head><body></body>'
},
{
name: 'unclosed head and body',
data: '<head><body>'
},
{
name: 'unclosed body',
data: '<body>'
},
{
name: 'empty body',
data: '<body></body>'
Expand All @@ -72,7 +85,7 @@ module.exports = [
data: '<body><p>text</p></body>'
},

// low-level tags
// common tags
{
name: 'empty div',
data: '<div></div>'
Expand Down Expand Up @@ -198,12 +211,32 @@ module.exports = [
name: 'text',
data: 'text'
},
{
name: 'unclosed tag',
data: '<div>'
},
{
name: 'unclosed tags',
data: '<p><span>'
},
{
name: 'closing tag',
data: '</div>'
},
{
name: 'empty string',
data: ''
},
{
name: 'space',
data: ' '
},
{
name: 'custom tag',
data: '<custom>'
},
{
name: 'custom tags',
data: '<foo><bar>'
}
];

0 comments on commit 6fdf2ea

Please sign in to comment.