|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
3 | | -exports[`Options url {Boolean} 1`] = ` |
| 3 | +exports[`Options url {Boolean} - false 1`] = ` |
| 4 | +"// HTML |
| 5 | +export default \`<!DOCTYPE html> |
| 6 | +<html lang=\\"en\\"> |
| 7 | +<head> |
| 8 | + <meta charset=\\"utf-8\\"> |
| 9 | + <title>HTML Loader</title> |
| 10 | + <!-- Ignore --> |
| 11 | + <link href=\\"//file.css\\"> |
| 12 | + <link href=\\"//cdn.com/file.css\\"> |
| 13 | + <link href=\\"http://cdn.com/file.css\\"> |
| 14 | + <link href=\\"https://cdn.com/file.css\\"> |
| 15 | + <!-- Transform --> |
| 16 | + <link href=\\"./file.css\\"> |
| 17 | + <link href=\\"/file.css\\"> |
| 18 | +</head> |
| 19 | +<body> |
| 20 | + <!-- Ignore --> |
| 21 | + <img src=\\"//file.png\\"> |
| 22 | + <img src=\\"//cdn.com/file.png\\"> |
| 23 | + <img src=\\"http://cdn.com/file.png\\"> |
| 24 | + <img src=\\"https://cdn.com/file.png\\"> |
| 25 | + <!-- Transform --> |
| 26 | + <img src=\\"./file.png\\"> |
| 27 | + <img src=\\"/file.png\\"> |
| 28 | +
|
| 29 | + <picture> |
| 30 | + <source srcset=\\"./file.svg\\" type=\\"image/svg+xml\\"> |
| 31 | + <img src=\\"./file.png\\" alt=\\"Image\\"> |
| 32 | + </picture> |
| 33 | +
|
| 34 | + <video width=\\"320\\" height=\\"240\\" controls=\\"\\"> |
| 35 | + <source src=\\"./file.mp4\\" type=\\"video/mp4\\"> |
| 36 | + <source src=\\"./file.ogg\\" type=\\"video/ogg\\"> |
| 37 | + Your browser does not support the <code>video<code> element. |
| 38 | + </code></code></video> |
| 39 | +
|
| 40 | + <audio src=\\"./file.mp3\\" autoplay=\\"\\"></audio> |
| 41 | +
|
| 42 | + <audio controls=\\"controls\\"> |
| 43 | + Your browser does not support the <code>audio</code> element. |
| 44 | + <source src=\\"./file.wav\\" type=\\"audio/wav\\"> |
| 45 | + </audio> |
| 46 | +
|
| 47 | + <audio src=\\"./file.ogg\\"> |
| 48 | + <track kind=\\"captions\\" src=\\"./file.en.vtt\\" srclang=\\"en\\" label=\\"English\\"> |
| 49 | + <track kind=\\"captions\\" src=\\"./file.sv.vtt\\" srclang=\\"sv\\" label=\\"Svenska\\"> |
| 50 | + </audio> |
| 51 | +</body> |
| 52 | +</html> |
| 53 | +\`" |
| 54 | +`; |
| 55 | +
|
| 56 | +exports[`Options url {Boolean} - true - (default) 1`] = ` |
4 | 57 | "// HTML URLs |
5 | 58 | import HTML__URL__0 from './file.css'; |
6 | 59 | import HTML__URL__1 from '/file.css'; |
@@ -67,3 +120,62 @@ export default \`<!DOCTYPE html> |
67 | 120 | </html> |
68 | 121 | \`" |
69 | 122 | `; |
| 123 | +
|
| 124 | +exports[`Options url {Function} 1`] = ` |
| 125 | +"// HTML URLs |
| 126 | +import HTML__URL__0 from './file.png'; |
| 127 | +import HTML__URL__1 from '/file.png'; |
| 128 | +
|
| 129 | +// HTML |
| 130 | +export default \`<!-- Ignore --> |
| 131 | +<img src=\\"//file.png\\"> |
| 132 | +<img src=\\"//cdn.com/file.png\\"> |
| 133 | +<img src=\\"http://cdn.com/file.png\\"> |
| 134 | +<img src=\\"https://cdn.com/file.png\\"> |
| 135 | +<!-- Transform --> |
| 136 | +<img src=\\"\${HTML__URL__0}\\"> |
| 137 | +<img src=\\"\${HTML__URL__1}\\"> |
| 138 | +<!-- Filter --> |
| 139 | +<img src=\\"./filter/file.png\\"> |
| 140 | +<img src=\\"/filter/file.png\\">\`" |
| 141 | +`; |
| 142 | +
|
| 143 | +exports[`Options url {RegExp} 1`] = ` |
| 144 | +"// HTML URLs |
| 145 | +import HTML__URL__0 from './file.png'; |
| 146 | +import HTML__URL__1 from '/file.png'; |
| 147 | +
|
| 148 | +// HTML |
| 149 | +export default \`<!-- Ignore --> |
| 150 | +<img src=\\"//file.png\\"> |
| 151 | +<img src=\\"//cdn.com/file.png\\"> |
| 152 | +<img src=\\"http://cdn.com/file.png\\"> |
| 153 | +<img src=\\"https://cdn.com/file.png\\"> |
| 154 | +<!-- Transform --> |
| 155 | +<img src=\\"\${HTML__URL__0}\\"> |
| 156 | +<img src=\\"\${HTML__URL__1}\\"> |
| 157 | +<!-- Filter --> |
| 158 | +<img src=\\"./filter/file.png\\"> |
| 159 | +<img src=\\"/filter/file.png\\">\`" |
| 160 | +`; |
| 161 | +
|
| 162 | +exports[`Options url {String} 1`] = ` |
| 163 | +"// HTML URLs |
| 164 | +import HTML__URL__0 from './file.png'; |
| 165 | +import HTML__URL__1 from '/file.png'; |
| 166 | +import HTML__URL__2 from './filter/file.png'; |
| 167 | +import HTML__URL__3 from '/filter/file.png'; |
| 168 | +
|
| 169 | +// HTML |
| 170 | +export default \`<!-- Ignore --> |
| 171 | +<img src=\\"//file.png\\"> |
| 172 | +<img src=\\"//cdn.com/file.png\\"> |
| 173 | +<img src=\\"http://cdn.com/file.png\\"> |
| 174 | +<img src=\\"https://cdn.com/file.png\\"> |
| 175 | +<!-- Transform --> |
| 176 | +<img src=\\"\${HTML__URL__0}\\"> |
| 177 | +<img src=\\"\${HTML__URL__1}\\"> |
| 178 | +<!-- Filter --> |
| 179 | +<img src=\\"\${HTML__URL__2}\\"> |
| 180 | +<img src=\\"\${HTML__URL__3}\\">\`" |
| 181 | +`; |
0 commit comments