Skip to content

Commit

Permalink
test(cases): add html test cases for noscript tag
Browse files Browse the repository at this point in the history
Disable noscript with paragraph test when environment is jsdom
because jsdom renders children as text instead of nodes.
  • Loading branch information
remarkablemark committed Jun 1, 2020
1 parent 4e0036a commit 40ade7e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/cases/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,26 @@ module.exports = [
data: '<script type="application/json">{"foo":"bar"}</script>'
},

// noscript tag
{
name: 'empty noscript',
data: '<noscript></noscript>'
},
{
name: 'noscript with text',
data: '<noscript>JS is not enabled</noscript>'
},
{
name: 'noscript with p',
data: '<noscript><p>JS is disabled</p></noscript>',
get skip() {
// client parser renders noscript incorrectly in jsdom
// template renders noscript children as text instead of nodes
var isJSDOM = typeof window === 'object' && window.name === 'nodejs';
return isJSDOM;
}
},

// style tag
{
name: 'empty style',
Expand Down

0 comments on commit 40ade7e

Please sign in to comment.