|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
| 3 | +exports[`import option Function: errors 1`] = `Array []`; |
| 4 | + |
| 5 | +exports[`import option Function: module (evaluated) 1`] = ` |
| 6 | +Array [ |
| 7 | + Array [ |
| 8 | + 3, |
| 9 | + "a { |
| 10 | + b: b; |
| 11 | +} |
| 12 | +", |
| 13 | + "((min-width: 100px)) and (screen and print)", |
| 14 | + ], |
| 15 | + Array [ |
| 16 | + 2, |
| 17 | + ".test { |
| 18 | + c: c; |
| 19 | +} |
| 20 | +", |
| 21 | + "screen and print", |
| 22 | + ], |
| 23 | + Array [ |
| 24 | + 1, |
| 25 | + "@import url(http://example.com/style.css);", |
| 26 | + "", |
| 27 | + ], |
| 28 | + Array [ |
| 29 | + 1, |
| 30 | + "@import url(http://example.com/style.css#hash);", |
| 31 | + "", |
| 32 | + ], |
| 33 | + Array [ |
| 34 | + 1, |
| 35 | + "@import url(http://example.com/style.css?#hash);", |
| 36 | + "", |
| 37 | + ], |
| 38 | + Array [ |
| 39 | + 1, |
| 40 | + "@import url(http://example.com/style.css?foo=bar#hash);", |
| 41 | + "", |
| 42 | + ], |
| 43 | + Array [ |
| 44 | + 1, |
| 45 | + "@import url(http://example.com/other-style.css);", |
| 46 | + "screen and print", |
| 47 | + ], |
| 48 | + Array [ |
| 49 | + 1, |
| 50 | + "@import url(//example.com/style.css);", |
| 51 | + "", |
| 52 | + ], |
| 53 | + Array [ |
| 54 | + 4, |
| 55 | + ".query { |
| 56 | + e: e; |
| 57 | +} |
| 58 | +", |
| 59 | + "", |
| 60 | + ], |
| 61 | + Array [ |
| 62 | + 5, |
| 63 | + ".other-query { |
| 64 | + f: f; |
| 65 | +} |
| 66 | +", |
| 67 | + "", |
| 68 | + ], |
| 69 | + Array [ |
| 70 | + 6, |
| 71 | + ".other-query { |
| 72 | + f: f; |
| 73 | +} |
| 74 | +", |
| 75 | + "screen and print", |
| 76 | + ], |
| 77 | + Array [ |
| 78 | + 1, |
| 79 | + "@import url(https://fonts.googleapis.com/css?family=Roboto);", |
| 80 | + "", |
| 81 | + ], |
| 82 | + Array [ |
| 83 | + 1, |
| 84 | + "@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC);", |
| 85 | + "", |
| 86 | + ], |
| 87 | + Array [ |
| 88 | + 1, |
| 89 | + "@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC|Roboto);", |
| 90 | + "", |
| 91 | + ], |
| 92 | + Array [ |
| 93 | + 7, |
| 94 | + ".relative { |
| 95 | + color: red; |
| 96 | +} |
| 97 | +", |
| 98 | + "", |
| 99 | + ], |
| 100 | + Array [ |
| 101 | + 8, |
| 102 | + ".top-relative { |
| 103 | + color: black; |
| 104 | +} |
| 105 | +", |
| 106 | + "", |
| 107 | + ], |
| 108 | + Array [ |
| 109 | + 9, |
| 110 | + ".tilde { |
| 111 | + color: yellow; |
| 112 | +} |
| 113 | +", |
| 114 | + "", |
| 115 | + ], |
| 116 | + Array [ |
| 117 | + 10, |
| 118 | + ".alias { |
| 119 | + color: red; |
| 120 | +} |
| 121 | +", |
| 122 | + "", |
| 123 | + ], |
| 124 | + Array [ |
| 125 | + 11, |
| 126 | + ".background-imported { |
| 127 | + background: url(/webpack/public/path/img.png); |
| 128 | +} |
| 129 | +", |
| 130 | + "", |
| 131 | + ], |
| 132 | + Array [ |
| 133 | + 1, |
| 134 | + "@import url(test.css); |
| 135 | +@import url('test.css'); |
| 136 | +@import url(\\"test.css\\"); |
| 137 | +@IMPORT url(test.css); |
| 138 | +@import URL(test.css); |
| 139 | +@import url(test.css ); |
| 140 | +@import url( test.css); |
| 141 | +@import url( test.css ); |
| 142 | +@import url( |
| 143 | + test.css |
| 144 | +); |
| 145 | +@import url(); |
| 146 | +@import url(''); |
| 147 | +@import url(\\"\\"); |
| 148 | +@import \\"test.css\\"; |
| 149 | +@import 'test.css'; |
| 150 | +@import ''; |
| 151 | +@import \\"\\"; |
| 152 | +@import \\" \\"; |
| 153 | +@import \\" |
| 154 | +\\"; |
| 155 | +@import url(); |
| 156 | +@import url(''); |
| 157 | +@import url(\\"\\"); |
| 158 | +@import url(test.css) screen and print; |
| 159 | +@import url(test.css) SCREEN AND PRINT; |
| 160 | +@import url(test.css)screen and print; |
| 161 | +@import url(test.css) screen and print; |
| 162 | +@import url(~package/test.css); |
| 163 | +@import ; |
| 164 | +@import foo-bar; |
| 165 | +@import-normalize; |
| 166 | +@import url('http://') :root {} |
| 167 | +
|
| 168 | +.class { |
| 169 | + a: b c d; |
| 170 | +} |
| 171 | +
|
| 172 | +.foo { |
| 173 | + @import 'path.css'; |
| 174 | +} |
| 175 | +
|
| 176 | +.background { |
| 177 | + background: url(/webpack/public/path/img.png); |
| 178 | +} |
| 179 | +", |
| 180 | + "", |
| 181 | + ], |
| 182 | +] |
| 183 | +`; |
| 184 | + |
| 185 | +exports[`import option Function: module 1`] = ` |
| 186 | +"exports = module.exports = require(\\"../../../src/runtime/api.js\\")(false); |
| 187 | +// Imports |
| 188 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./test-media.css\\"), \\"screen and print\\"); |
| 189 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./test-other.css\\"), \\"(min-width: 100px)\\"); |
| 190 | +exports.push([module.id, \\"@import url(http://example.com/style.css);\\", \\"\\"]); |
| 191 | +exports.push([module.id, \\"@import url(http://example.com/style.css#hash);\\", \\"\\"]); |
| 192 | +exports.push([module.id, \\"@import url(http://example.com/style.css?#hash);\\", \\"\\"]); |
| 193 | +exports.push([module.id, \\"@import url(http://example.com/style.css?foo=bar#hash);\\", \\"\\"]); |
| 194 | +exports.push([module.id, \\"@import url(http://example.com/other-style.css);\\", \\"screen and print\\"]); |
| 195 | +exports.push([module.id, \\"@import url(//example.com/style.css);\\", \\"\\"]); |
| 196 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./query.css?foo=1&bar=1\\"), \\"\\"); |
| 197 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./other-query.css?foo=1&bar=1#hash\\"), \\"\\"); |
| 198 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./other-query.css?foo=1&bar=1#hash\\"), \\"screen and print\\"); |
| 199 | +exports.push([module.id, \\"@import url(https://fonts.googleapis.com/css?family=Roboto);\\", \\"\\"]); |
| 200 | +exports.push([module.id, \\"@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC);\\", \\"\\"]); |
| 201 | +exports.push([module.id, \\"@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC|Roboto);\\", \\"\\"]); |
| 202 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./relative.css\\"), \\"\\"); |
| 203 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!../import/top-relative.css\\"), \\"\\"); |
| 204 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!package/tilde.css\\"), \\"\\"); |
| 205 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!aliasesImport/alias.css\\"), \\"\\"); |
| 206 | +exports.i(require(\\"-!../../../src/index.js??ref--4-0!./url.css\\"), \\"\\"); |
| 207 | +var urlEscape = require(\\"../../../src/runtime/url-escape.js\\"); |
| 208 | +var ___CSS_LOADER_URL___0___ = urlEscape(require(\\"./img.png\\")); |
| 209 | +
|
| 210 | +// Module |
| 211 | +exports.push([module.id, \\"@import url(test.css);\\\\n@import url('test.css');\\\\n@import url(\\\\\\"test.css\\\\\\");\\\\n@IMPORT url(test.css);\\\\n@import URL(test.css);\\\\n@import url(test.css );\\\\n@import url( test.css);\\\\n@import url( test.css );\\\\n@import url(\\\\n test.css\\\\n);\\\\n@import url();\\\\n@import url('');\\\\n@import url(\\\\\\"\\\\\\");\\\\n@import \\\\\\"test.css\\\\\\";\\\\n@import 'test.css';\\\\n@import '';\\\\n@import \\\\\\"\\\\\\";\\\\n@import \\\\\\" \\\\\\";\\\\n@import \\\\\\"\\\\n\\\\\\";\\\\n@import url();\\\\n@import url('');\\\\n@import url(\\\\\\"\\\\\\");\\\\n@import url(test.css) screen and print;\\\\n@import url(test.css) SCREEN AND PRINT;\\\\n@import url(test.css)screen and print;\\\\n@import url(test.css) screen and print;\\\\n@import url(~package/test.css);\\\\n@import ;\\\\n@import foo-bar;\\\\n@import-normalize;\\\\n@import url('http://') :root {}\\\\n\\\\n.class {\\\\n a: b c d;\\\\n}\\\\n\\\\n.foo {\\\\n @import 'path.css';\\\\n}\\\\n\\\\n.background {\\\\n background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\", \\"\\"]); |
| 212 | +
|
| 213 | +" |
| 214 | +`; |
| 215 | + |
| 216 | +exports[`import option Function: warnings 1`] = ` |
| 217 | +Array [ |
| 218 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 219 | +Warning |
| 220 | +
|
| 221 | +(12:1) Unable to find uri in '@import url()'", |
| 222 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 223 | +Warning |
| 224 | +
|
| 225 | +(13:1) Unable to find uri in '@import url('')'", |
| 226 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 227 | +Warning |
| 228 | +
|
| 229 | +(14:1) Unable to find uri in '@import url(\\"\\")'", |
| 230 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 231 | +Warning |
| 232 | +
|
| 233 | +(17:1) Unable to find uri in '@import '''", |
| 234 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 235 | +Warning |
| 236 | +
|
| 237 | +(18:1) Unable to find uri in '@import \\"\\"'", |
| 238 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 239 | +Warning |
| 240 | +
|
| 241 | +(19:1) Unable to find uri in '@import \\" \\"'", |
| 242 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 243 | +Warning |
| 244 | +
|
| 245 | +(20:1) Unable to find uri in '@import \\" |
| 246 | +\\"'", |
| 247 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 248 | +Warning |
| 249 | +
|
| 250 | +(22:1) Unable to find uri in '@import url()'", |
| 251 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 252 | +Warning |
| 253 | +
|
| 254 | +(23:1) Unable to find uri in '@import url('')'", |
| 255 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 256 | +Warning |
| 257 | +
|
| 258 | +(24:1) Unable to find uri in '@import url(\\"\\")'", |
| 259 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 260 | +Warning |
| 261 | +
|
| 262 | +(40:1) Unable to find uri in '@import '", |
| 263 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 264 | +Warning |
| 265 | +
|
| 266 | +(41:1) Unable to find uri in '@import foo-bar'", |
| 267 | + "ModuleWarning: Module Warning (from \`replaced original path\`): |
| 268 | +Warning |
| 269 | +
|
| 270 | +(43:1) It looks like you didn't end your @import statement correctly. Child nodes are attached to it.", |
| 271 | +] |
| 272 | +`; |
| 273 | + |
3 | 274 | exports[`import option false: errors 1`] = `Array []`;
|
4 | 275 |
|
5 | 276 | exports[`import option false: module (evaluated) 1`] = `
|
|
0 commit comments