diff --git a/package.json b/package.json index a2975255..e3af6294 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,6 @@ } }, "dependencies": { - "klona": "^2.0.6", "neo-async": "^2.6.2" }, "devDependencies": { diff --git a/src/utils.js b/src/utils.js index d29080cd..d5a0dd7a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,7 +1,6 @@ import url from "url"; import path from "path"; -import { klona } from "klona/full"; import async from "neo-async"; function getDefaultSassImplementation() { @@ -112,24 +111,21 @@ async function getSassOptions( implementation, useSourceMap ) { - const options = klona( - loaderOptions.sassOptions - ? typeof loaderOptions.sassOptions === "function" - ? loaderOptions.sassOptions(loaderContext) || {} - : loaderOptions.sassOptions - : {} - ); - - const isDartSass = implementation.info.includes("dart-sass"); - const isModernAPI = loaderOptions.api === "modern"; - - options.data = loaderOptions.additionalData - ? typeof loaderOptions.additionalData === "function" - ? await loaderOptions.additionalData(content, loaderContext) - : `${loaderOptions.additionalData}\n${content}` - : content; + const options = loaderOptions.sassOptions + ? typeof loaderOptions.sassOptions === "function" + ? loaderOptions.sassOptions(loaderContext) || {} + : loaderOptions.sassOptions + : {}; + const sassOptions = { + ...options, + data: loaderOptions.additionalData + ? typeof loaderOptions.additionalData === "function" + ? await loaderOptions.additionalData(content, loaderContext) + : `${loaderOptions.additionalData}\n${content}` + : content, + }; - if (!options.logger) { + if (!sassOptions.logger) { const needEmitWarning = loaderOptions.warnRuleAsWarning !== false; const logger = loaderContext.getLogger("sass-loader"); const formatSpan = (span) => @@ -137,7 +133,7 @@ async function getSassOptions( const formatDebugSpan = (span) => `[debug:${span.start.line}:${span.start.column}] `; - options.logger = { + sassOptions.logger = { debug(message, loggerOptions) { let builtMessage = ""; @@ -180,44 +176,47 @@ async function getSassOptions( }; } + const isModernAPI = loaderOptions.api === "modern"; const { resourcePath } = loaderContext; if (isModernAPI) { - options.url = url.pathToFileURL(resourcePath); + sassOptions.url = url.pathToFileURL(resourcePath); // opt.outputStyle - if (!options.style && isProductionLikeMode(loaderContext)) { - options.style = "compressed"; + if (!sassOptions.style && isProductionLikeMode(loaderContext)) { + sassOptions.style = "compressed"; } if (useSourceMap) { - options.sourceMap = true; + sassOptions.sourceMap = true; } // If we are compiling sass and indentedSyntax isn't set, automatically set it. - if (typeof options.syntax === "undefined") { + if (typeof sassOptions.syntax === "undefined") { const ext = path.extname(resourcePath); if (ext && ext.toLowerCase() === ".scss") { - options.syntax = "scss"; + sassOptions.syntax = "scss"; } else if (ext && ext.toLowerCase() === ".sass") { - options.syntax = "indented"; + sassOptions.syntax = "indented"; } else if (ext && ext.toLowerCase() === ".css") { - options.syntax = "css"; + sassOptions.syntax = "css"; } } - options.importers = options.importers - ? Array.isArray(options.importers) - ? options.importers - : [options.importers] + sassOptions.importers = sassOptions.importers + ? Array.isArray(sassOptions.importers) + ? sassOptions.importers.slice() + : [sassOptions.importers] : []; } else { - options.file = resourcePath; + sassOptions.file = resourcePath; + + const isDartSass = implementation.info.includes("dart-sass"); if (isDartSass && isSupportedFibers()) { const shouldTryToResolveFibers = - !options.fiber && options.fiber !== false; + !sassOptions.fiber && sassOptions.fiber !== false; if (shouldTryToResolveFibers) { let fibers; @@ -230,20 +229,20 @@ async function getSassOptions( if (fibers) { // eslint-disable-next-line global-require, import/no-dynamic-require - options.fiber = require(fibers); + sassOptions.fiber = require(fibers); } - } else if (options.fiber === false) { + } else if (sassOptions.fiber === false) { // Don't pass the `fiber` option for `sass` (`Dart Sass`) - delete options.fiber; + delete sassOptions.fiber; } } else { // Don't pass the `fiber` option for `node-sass` - delete options.fiber; + delete sassOptions.fiber; } // opt.outputStyle - if (!options.outputStyle && isProductionLikeMode(loaderContext)) { - options.outputStyle = "compressed"; + if (!sassOptions.outputStyle && isProductionLikeMode(loaderContext)) { + sassOptions.outputStyle = "compressed"; } if (useSourceMap) { @@ -253,11 +252,14 @@ async function getSassOptions( // But since we're using the data option, the source map will not actually be written, but // all paths in sourceMap.sources will be relative to that path. // Pretty complicated... :( - options.sourceMap = true; - options.outFile = path.join(loaderContext.rootContext, "style.css.map"); - options.sourceMapContents = true; - options.omitSourceMapUrl = true; - options.sourceMapEmbed = false; + sassOptions.sourceMap = true; + sassOptions.outFile = path.join( + loaderContext.rootContext, + "style.css.map" + ); + sassOptions.sourceMapContents = true; + sassOptions.omitSourceMapUrl = true; + sassOptions.sourceMapEmbed = false; } const ext = path.extname(resourcePath); @@ -266,31 +268,32 @@ async function getSassOptions( if ( ext && ext.toLowerCase() === ".sass" && - typeof options.indentedSyntax === "undefined" + typeof sassOptions.indentedSyntax === "undefined" ) { - options.indentedSyntax = true; + sassOptions.indentedSyntax = true; } else { - options.indentedSyntax = Boolean(options.indentedSyntax); + sassOptions.indentedSyntax = Boolean(sassOptions.indentedSyntax); } // Allow passing custom importers to `sass`/`node-sass`. Accepts `Function` or an array of `Function`s. - options.importer = options.importer + sassOptions.importer = sassOptions.importer ? proxyCustomImporters( - Array.isArray(options.importer) - ? options.importer - : [options.importer], + Array.isArray(sassOptions.importer) + ? sassOptions.importer.slice() + : [sassOptions.importer], loaderContext ) : []; - options.includePaths = [] + sassOptions.includePaths = [] .concat(process.cwd()) .concat( // We use `includePaths` in context for resolver, so it should be always absolute - (options.includePaths || []).map((includePath) => - path.isAbsolute(includePath) - ? includePath - : path.join(process.cwd(), includePath) + (sassOptions.includePaths ? sassOptions.includePaths.slice() : []).map( + (includePath) => + path.isAbsolute(includePath) + ? includePath + : path.join(process.cwd(), includePath) ) ) .concat( @@ -301,12 +304,12 @@ async function getSassOptions( : [] ); - if (typeof options.charset === "undefined") { - options.charset = true; + if (typeof sassOptions.charset === "undefined") { + sassOptions.charset = true; } } - return options; + return sassOptions; } const MODULE_REQUEST_REGEX = /^[^?]*~/; diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index b61094f7..b4cb5d04 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -3127,6 +3127,66 @@ exports[`loader should work ('dart-sass', 'legacy' API, 'sass' syntax) add "@cha exports[`loader should work ('dart-sass', 'legacy' API, 'sass' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('dart-sass', 'legacy' API, 'sass' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.message, .warning, .error, .success { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} + +.success { + border-color: green; +} + +.error { + border-color: red; +} + +.warning { + border-color: yellow; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('dart-sass', 'legacy' API, 'sass' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('dart-sass', 'legacy' API, 'sass' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('dart-sass', 'legacy' API, 'sass' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "p { content: "é"; @@ -3339,6 +3399,48 @@ exports[`loader should work ('dart-sass', 'legacy' API, 'scss' syntax) add "@cha exports[`loader should work ('dart-sass', 'legacy' API, 'scss' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('dart-sass', 'legacy' API, 'scss' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('dart-sass', 'legacy' API, 'scss' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('dart-sass', 'legacy' API, 'scss' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('dart-sass', 'legacy' API, 'scss' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "p { content: "é"; @@ -3497,6 +3599,66 @@ exports[`loader should work ('dart-sass', 'modern' API, 'sass' syntax) add "@cha exports[`loader should work ('dart-sass', 'modern' API, 'sass' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('dart-sass', 'modern' API, 'sass' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.message, .warning, .error, .success { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} + +.success { + border-color: green; +} + +.error { + border-color: red; +} + +.warning { + border-color: yellow; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('dart-sass', 'modern' API, 'sass' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('dart-sass', 'modern' API, 'sass' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('dart-sass', 'modern' API, 'sass' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "@charset "UTF-8"; p { @@ -3710,6 +3872,48 @@ exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax) add "@cha exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "@charset "UTF-8"; p { @@ -3858,6 +4062,58 @@ exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax): errors 1 exports[`loader should work ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`loader should work ('node-sass', 'legacy' API, 'sass' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import url(./file.css); +body { + font: 100% Helvetica, sans-serif; + color: #333; } + +nav ul { + margin: 0; + padding: 0; + list-style: none; } + +nav li { + display: inline-block; } + +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; } + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } + +.message, .success, .error, .warning { + border: 1px solid #ccc; + padding: 10px; + color: #333; } + +.success { + border-color: green; } + +.error { + border-color: red; } + +.warning { + border-color: yellow; } + +.foo:before { + content: ""; } + +.bar:before { + content: "∑"; } +" +`; + +exports[`loader should work ('node-sass', 'legacy' API, 'sass' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('node-sass', 'legacy' API, 'sass' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('node-sass', 'legacy' API, 'sass' syntax) with the "filesystem" cache: css 1`] = ` "@charset "UTF-8"; @import url(./file.css); @@ -4014,6 +4270,44 @@ exports[`loader should work ('node-sass', 'legacy' API, 'sass' syntax): errors 1 exports[`loader should work ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`loader should work ('node-sass', 'legacy' API, 'scss' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import url(./file.css); +body { + font: 100% Helvetica, sans-serif; + color: #333; } + +nav ul { + margin: 0; + padding: 0; + list-style: none; } + +nav li { + display: inline-block; } + +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; } + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } + +.foo:before { + content: ""; } + +.bar:before { + content: "∑"; } +" +`; + +exports[`loader should work ('node-sass', 'legacy' API, 'scss' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('node-sass', 'legacy' API, 'scss' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('node-sass', 'legacy' API, 'scss' syntax) with the "filesystem" cache: css 1`] = ` "@charset "UTF-8"; @import url(./file.css); @@ -4139,6 +4433,66 @@ exports[`loader should work ('sass-embedded', 'legacy' API, 'sass' syntax) add " exports[`loader should work ('sass-embedded', 'legacy' API, 'sass' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('sass-embedded', 'legacy' API, 'sass' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.message, .warning, .error, .success { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} + +.success { + border-color: green; +} + +.error { + border-color: red; +} + +.warning { + border-color: yellow; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('sass-embedded', 'legacy' API, 'sass' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('sass-embedded', 'legacy' API, 'sass' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('sass-embedded', 'legacy' API, 'sass' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "p { content: "é"; @@ -4351,6 +4705,48 @@ exports[`loader should work ('sass-embedded', 'legacy' API, 'scss' syntax) add " exports[`loader should work ('sass-embedded', 'legacy' API, 'scss' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('sass-embedded', 'legacy' API, 'scss' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('sass-embedded', 'legacy' API, 'scss' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('sass-embedded', 'legacy' API, 'scss' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('sass-embedded', 'legacy' API, 'scss' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "p { content: "é"; @@ -4509,6 +4905,66 @@ exports[`loader should work ('sass-embedded', 'modern' API, 'sass' syntax) add " exports[`loader should work ('sass-embedded', 'modern' API, 'sass' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('sass-embedded', 'modern' API, 'sass' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.message, .warning, .error, .success { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} + +.success { + border-color: green; +} + +.error { + border-color: red; +} + +.warning { + border-color: yellow; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('sass-embedded', 'modern' API, 'sass' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('sass-embedded', 'modern' API, 'sass' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('sass-embedded', 'modern' API, 'sass' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "@charset "UTF-8"; p { @@ -4722,6 +5178,48 @@ exports[`loader should work ('sass-embedded', 'modern' API, 'scss' syntax) add " exports[`loader should work ('sass-embedded', 'modern' API, 'scss' syntax) add "@charset "UTF-8";" for non ascii characters: warnings 1`] = `[]`; +exports[`loader should work ('sass-embedded', 'modern' API, 'scss' syntax) and don't modify sass options: css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`loader should work ('sass-embedded', 'modern' API, 'scss' syntax) and don't modify sass options: errors 1`] = `[]`; + +exports[`loader should work ('sass-embedded', 'modern' API, 'scss' syntax) and don't modify sass options: warnings 1`] = `[]`; + exports[`loader should work ('sass-embedded', 'modern' API, 'scss' syntax) to disable "@charset "UTF-8";" generation: css 1`] = ` "@charset "UTF-8"; p { diff --git a/test/helpers/getCodeFromSass.js b/test/helpers/getCodeFromSass.js index 665b30b5..2b4e4d4b 100644 --- a/test/helpers/getCodeFromSass.js +++ b/test/helpers/getCodeFromSass.js @@ -2,15 +2,12 @@ import url from "url"; import path from "path"; import fs from "fs"; -import { klona } from "klona/full"; - async function getCodeFromSass(testId, options, context = {}) { - const loaderOptions = klona(options); - let sassOptions = options.sassOptions || {}; - - if (typeof sassOptions === "function") { - sassOptions = sassOptions({ mock: true }) || {}; - } + const loaderOptions = { ...options }; + const sassOptions = + typeof loaderOptions.sassOptions === "function" + ? loaderOptions.sassOptions({ mock: true }) || {} + : { ...options.sassOptions } || {}; if (sassOptions.data) { delete sassOptions.data; diff --git a/test/loader.test.js b/test/loader.test.js index d147e2b1..249d42fa 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -62,6 +62,37 @@ describe("loader", () => { expect(getErrors(stats)).toMatchSnapshot("errors"); }); + it(`should work ('${implementationName}', '${api}' API, '${syntax}' syntax) and don't modify sass options`, async () => { + const testId = getTestId("language", syntax); + const sassOptions = isModernAPI + ? { loadPaths: ["node_modules/foundation-sites/scss"] } + : { includePaths: ["node_modules/foundation-sites/scss"] }; + const options = { + implementation, + api, + sassOptions, + }; + const compiler = getCompiler(testId, { loader: { options } }); + const stats = await compile(compiler); + const codeFromBundle = getCodeFromBundle(stats, compiler); + const codeFromSass = await getCodeFromSass(testId, options); + + if (isModernAPI) { + expect(sassOptions).toEqual({ + loadPaths: ["node_modules/foundation-sites/scss"], + }); + } else { + expect(sassOptions).toEqual({ + includePaths: ["node_modules/foundation-sites/scss"], + }); + } + + expect(codeFromBundle.css).toBe(codeFromSass.css); + expect(codeFromBundle.css).toMatchSnapshot("css"); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + it(`should work ('${implementationName}', '${api}' API, '${syntax}' syntax) with the "memory" cache`, async () => { const cache = path.resolve( __dirname,