Skip to content

Commit 91fb7de

Browse files
committed
Normalize all the line endings
1 parent e43b59f commit 91fb7de

File tree

2 files changed

+66
-66
lines changed

2 files changed

+66
-66
lines changed

test/browser/dangerous.test.html

+43-43
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<meta charset="utf-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<script src="/tester.js"></script>
7-
<script src="/bundles/nano.instrumented.min.js"></script>
8-
</head>
9-
<body>
10-
<div id="root"></div>
11-
12-
<script>
13-
const { h, render, Component, withStyles } = nanoJSX
14-
const root = document.getElementById('root')
15-
</script>
16-
17-
<script type="module">
18-
describe('dangerouslySetInnerHTML', async () => {
19-
const App = () => h('div', { dangerouslySetInnerHTML: { __html: '<p>html</p>' } })
20-
render(App, root, false)
21-
const div = root.lastChild
22-
Test.error(div.innerHTML === '<fragment><p>html</p></fragment>', `Should render without escaping.`)
23-
})
24-
25-
describe('dangerouslySetInnerHTML (modern)', async () => {
26-
const App = () => h('div', { innerHTML: { __dangerousHtml: '<p>html</p>' } })
27-
render(App, root, false)
28-
const div = root.lastChild
29-
console.log(div.innerHTML, div.innerText)
30-
Test.error(div.innerHTML === '<fragment><p>html</p></fragment>', `Should render without escaping.`)
31-
})
32-
33-
describe('dangerouslySetInnerHTML (none)', async () => {
34-
const App = () => h('div', null, '<p>html</p>')
35-
render(App, root, false)
36-
const div = root.lastChild
37-
Test.error(div.innerHTML === '&lt;p&gt;html&lt;/p&gt;', `HTML should be escaped.`)
38-
})
39-
40-
Test.start()
41-
</script>
42-
</body>
43-
</html>
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<script src="/tester.js"></script>
7+
<script src="/bundles/nano.instrumented.min.js"></script>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
12+
<script>
13+
const { h, render, Component, withStyles } = nanoJSX
14+
const root = document.getElementById('root')
15+
</script>
16+
17+
<script type="module">
18+
describe('dangerouslySetInnerHTML', async () => {
19+
const App = () => h('div', { dangerouslySetInnerHTML: { __html: '<p>html</p>' } })
20+
render(App, root, false)
21+
const div = root.lastChild
22+
Test.error(div.innerHTML === '<fragment><p>html</p></fragment>', `Should render without escaping.`)
23+
})
24+
25+
describe('dangerouslySetInnerHTML (modern)', async () => {
26+
const App = () => h('div', { innerHTML: { __dangerousHtml: '<p>html</p>' } })
27+
render(App, root, false)
28+
const div = root.lastChild
29+
console.log(div.innerHTML, div.innerText)
30+
Test.error(div.innerHTML === '<fragment><p>html</p></fragment>', `Should render without escaping.`)
31+
})
32+
33+
describe('dangerouslySetInnerHTML (none)', async () => {
34+
const App = () => h('div', null, '<p>html</p>')
35+
render(App, root, false)
36+
const div = root.lastChild
37+
Test.error(div.innerHTML === '&lt;p&gt;html&lt;/p&gt;', `HTML should be escaped.`)
38+
})
39+
40+
Test.start()
41+
</script>
42+
</body>
43+
</html>
+23-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
const path = require('path')
2-
3-
module.exports = {
4-
mode: 'development',
5-
stats: 'errors-warnings',
6-
devtool: 'source-map',
7-
entry: './lib/bundles/bundle.full.js',
8-
output: {
9-
filename: 'nano.instrumented.min.js',
10-
path: path.resolve(__dirname, '../bundles'),
11-
library: 'nanoJSX',
12-
libraryExport: 'default'
13-
},
14-
resolve: {
15-
extensions: ['.js']
16-
},
17-
module: {
18-
rules: [
19-
{ test: /\.jsx?$/, use: ['coverage-istanbul-loader'] }
20-
// { test: /\.tsx?$/, use: ['coverage-istanbul-loader', 'ts-loader'] }
21-
]
22-
}
23-
}
1+
const path = require('path')
2+
3+
module.exports = {
4+
mode: 'development',
5+
stats: 'errors-warnings',
6+
devtool: 'source-map',
7+
entry: './lib/bundles/bundle.full.js',
8+
output: {
9+
filename: 'nano.instrumented.min.js',
10+
path: path.resolve(__dirname, '../bundles'),
11+
library: 'nanoJSX',
12+
libraryExport: 'default'
13+
},
14+
resolve: {
15+
extensions: ['.js']
16+
},
17+
module: {
18+
rules: [
19+
{ test: /\.jsx?$/, use: ['coverage-istanbul-loader'] }
20+
// { test: /\.tsx?$/, use: ['coverage-istanbul-loader', 'ts-loader'] }
21+
]
22+
}
23+
}

0 commit comments

Comments
 (0)