MCPcopy Create free account
hub / github.com/webpack/less-loader / testLoader

Function testLoader

test/helpers/testLoader.cjs:8–16  ·  view source on GitHub ↗

* @param {string} content content * @param {RawSourceMap} sourceMap source map * @returns {string} code for tests

(content, sourceMap)

Source from the content-addressed store, hash-verified

6 * @returns {string} code for tests
7 */
8function testLoader(content, sourceMap) {
9 const result = { css: content };
10
11 if (sourceMap) {
12 result.map = sourceMap;
13 }
14
15 return `export default ${JSON.stringify(result)}`;
16}
17
18module.exports = testLoader;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…