forked from mystiq/hydrogen-web
Add another test.
This commit is contained in:
parent
5e39eb8f6c
commit
0c05ff459c
1 changed files with 7 additions and 0 deletions
|
@ -345,6 +345,13 @@ export function tests() {
|
||||||
];
|
];
|
||||||
test(assert, input, output);
|
test(assert, input, output);
|
||||||
},
|
},
|
||||||
|
"Unknown and invalid attributes are stripped": assert => {
|
||||||
|
const input = '<em onmouseover=alert("Bad code!")>Hello</em>';
|
||||||
|
const output = [
|
||||||
|
new FormatPart("em", [new TextPart("Hello")])
|
||||||
|
];
|
||||||
|
test(assert, input, output);
|
||||||
|
},
|
||||||
/* Doesnt work: HTML library doesn't handle <pre><code> properly.
|
/* Doesnt work: HTML library doesn't handle <pre><code> properly.
|
||||||
"Text with code block": assert => {
|
"Text with code block": assert => {
|
||||||
const code = 'main :: IO ()\nmain = putStrLn "Hello"'
|
const code = 'main :: IO ()\nmain = putStrLn "Hello"'
|
||||||
|
|
Loading…
Reference in a new issue