exports[`@modular-css/css-to-js > should create coverage infrastructure when options.dev.coverage is truthy 1`] = ` const a = "mc74f3fa7b_a"; if(!globalThis.mcssCoverage) { globalThis.mcssCoverage = Object.create(null); } globalThis.mcssCoverage["a.css"] = Object.create(null); globalThis.mcssCoverage["a.css"]["a"] = 0; const cssData = { a }; export default new Proxy(cssData, { get(tgt, key) { if(key in tgt) { globalThis.mcssCoverage["a.css"][key]++; return tgt[key]; } throw new ReferenceError(key + " is not exported by a.css"); } }) export { a }; `; exports[`@modular-css/css-to-js > should deconflict the variable name in dev 1`] = ` const data = "mc74f3fa7b_data"; const cssData = { data }; export default new Proxy(cssData, { get(tgt, key) { if(key in tgt) { return tgt[key]; } throw new ReferenceError(key + " is not exported by a.css"); } }) export { data }; `; exports[`@modular-css/css-to-js > should dedupe repeated identifiers 1`] = ` import { a } from "/a.css"; const a1 = a + " " + "mc71966a67_a"; export default { "a" : a1 }; export { a1 as a }; `; exports[`@modular-css/css-to-js > should generate a javscript proxy in dev 1`] = ` const a = "mc74f3fa7b_a"; const cssData = { a }; export default new Proxy(cssData, { get(tgt, key) { if(key in tgt) { return tgt[key]; } throw new ReferenceError(key + " is not exported by a.css"); } }) export { a }; `; exports[`@modular-css/css-to-js > should generate empty results & a warning on invalid file input 1`] = ` export default null; `; exports[`@modular-css/css-to-js > should generate empty results & a warning on invalid file input 2`] = ` [ "./NOPE.css doesn't exist in the processor instance" ] `; exports[`@modular-css/css-to-js > should generate javascript 1`] = ` const a = "mc74f3fa7b_a"; export default { a }; export { a }; `; exports[`@modular-css/css-to-js > should generate javascript from composes 1`] = ` const custom = "mca72bf2bd_custom"; const rule = custom + " " + "mca72bf2bd_rule"; export default { custom, rule }; export { custom, rule }; `; exports[`@modular-css/css-to-js > should generate javascript from multiple composes 1`] = ` const rule = custom + " " + "mc9c938a76_rule"; const custom = "mc9c938a76_custom"; export default { rule, custom }; export { rule, custom }; `; exports[`@modular-css/css-to-js > should generate javascript with var variable statements 1`] = ` var str = "\\"string\\""; var $values = { str, }; var fooga = "mce1ef44f3_fooga"; export default { $values, fooga }; export { $values, fooga }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: false 1`] = ` const a1 = "mc74f3fa7b_a-1"; export default { "a-1" : a1 }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: false 2`] = ` [] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: false 3`] = ` [] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: true 1`] = ` const a1 = "mc74f3fa7b_a-1"; export default { "a-1" : a1 }; export { a1 }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: true 2`] = ` [ "\\"a-1\\" is not a valid JS identifier, exported as \\"a1\\"" ] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: true 3`] = ` [ "a1" ] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"rewriteInvalid\":false,\"warn\":false} 1`] = ` const a1 = "mc74f3fa7b_a-1"; export default { "a-1" : a1 }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"rewriteInvalid\":false,\"warn\":false} 2`] = ` [] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"rewriteInvalid\":false,\"warn\":false} 3`] = ` [] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"rewriteInvalid\":false} 1`] = ` const a1 = "mc74f3fa7b_a-1"; export default { "a-1" : a1 }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"rewriteInvalid\":false} 2`] = ` [ "\\"a-1\\" is not a valid JS identifier" ] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"rewriteInvalid\":false} 3`] = ` [] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"warn\":false} 1`] = ` const a1 = "mc74f3fa7b_a-1"; export default { "a-1" : a1 }; export { a1 }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"warn\":false} 2`] = ` [] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {\"warn\":false} 3`] = ` [ "a1" ] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {} 1`] = ` const a1 = "mc74f3fa7b_a-1"; export default { "a-1" : a1 }; export { a1 }; `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {} 2`] = ` [ "\\"a-1\\" is not a valid JS identifier, exported as \\"a1\\"" ] `; exports[`@modular-css/css-to-js > should handle options.namedExports set to: {} 3`] = ` [ "a1" ] `; exports[`@modular-css/css-to-js > should output css when requested 1`] = ` const a = "mc74f3fa7b_a"; export default { a }; export { a }; export const styles = ".mc74f3fa7b_a { color: red; }"; `; exports[`@modular-css/css-to-js > should output warnings when options.dev.warn is truthy 1`] = ` const a = "mc74f3fa7b_a"; const cssData = { a }; export default new Proxy(cssData, { get(tgt, key) { if(key in tgt) { return tgt[key]; } throw new ReferenceError(key + " is not exported by a.css"); } }) export { a }; `; exports[`@modular-css/css-to-js > should output warnings when options.dev.warn is truthy 2`] = ` const a = "mc74f3fa7b_a"; const cssData = { a }; export default new Proxy(cssData, { get(tgt, key) { if(key in tgt) { return tgt[key]; } console.warn(key, "is not exported by a.css") } }) export { a }; `; exports[`@modular-css/css-to-js > should output without default export 1`] = ` const a = "mc74f3fa7b_a"; export { a }; `; exports[`@modular-css/css-to-js > should represent external @values 1`] = ` import { $values as $aValues } from "/a.css"; const $values = { "v" : $aValues["v"], }; const b = "mc71966a67_b"; export default { $values, b }; export { $values, b }; `; exports[`@modular-css/css-to-js > should represent external @values aliased to local @values 1`] = ` import { $values as $aValues } from "/a.css"; const v = "#00F"; const $values = { "values" : $aValues, v, }; const b = "mc71966a67_b"; export default { $values, b }; export { $values, b }; `; exports[`@modular-css/css-to-js > should represent external @values namespaces 1`] = ` import { $values as $aValues } from "/a.css"; const v = "#0F0"; const $values = { "values" : $aValues, v, }; const b = "mc71966a67_b"; export default { $values, b }; export { $values, b }; `; exports[`@modular-css/css-to-js > should represent external composition 1`] = ` import { a } from "/a.css"; const b = a + " " + "mc71966a67_b"; export default { b }; export { b }; `; exports[`@modular-css/css-to-js > should represent global composition from external resources 1`] = ` const a = "foo" + " " + "mc74f3fa7b_a"; export default { a }; export { a }; `; exports[`@modular-css/css-to-js > should represent local @values 1`] = ` const v = "#00F"; const $values = { v, }; const a = "mc74f3fa7b_a"; export default { $values, a }; export { $values, a }; `; exports[`@modular-css/css-to-js > should represent local composition 1`] = ` const a = "mc74f3fa7b_a"; const b = a + " " + "mc74f3fa7b_b"; export default { a, b }; export { a, b }; `; exports[`@modular-css/css-to-js > should use relative imports when requested 1`] = ` import { a } from "./a.css"; const b = a + " " + "mc71966a67_b"; export default { b }; export { b }; `;