
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ConfigCacheTestCases css urls exported tests should be able to handle styles in spacing.css 1`] = `
Object {
"a": " url(img.09a1a1112c577c279435.png)",
"b": " url(img.09a1a1112c577c279435.png)",
"c": " url(img.09a1a1112c577c279435.png)",
"d": " url(img.09a1a1112c577c279435.png#hash)",
"e": " url(img.09a1a1112c577c279435.png)",
"f": " green url(img.09a1a1112c577c279435.png) xyz",
"g": " green url(img.09a1a1112c577c279435.png) xyz",
"getPropertyValue": [Function],
"h": " green url(img.09a1a1112c577c279435.png) xyz",
"i": " green url(img.09a1a1112c577c279435.png) url(img.09a1a1112c577c279435.png) xyz",
"j": " green url(img\\\\ img.09a1a1112c577c279435.png) xyz",
"k": " green url(img\\\\ img.09a1a1112c577c279435.png) xyz",
"l": " green url(img.09a1a1112c577c279435.png) xyz",
}
`;
exports[`ConfigCacheTestCases custom-modules json-custom exported tests should transform toml to json 1`] = `
Object {
"owner": Object {
"bio": "GitHub Cofounder & CEO
Likes tater tots and beer.",
"dob": "1979-05-27T07:32:00.000Z",
"name": "Tom Preston-Werner",
"organization": "GitHub",
},
"title": "TOML Example",
}
`;
exports[`ConfigCacheTestCases records issue-2991 exported tests should write relative paths to records 1`] = `
"{
\\"chunks\\": {
\\"byName\\": {
\\"main\\": 179
},
\\"bySource\\": {
\\"0 main\\": 179
},
\\"usedIds\\": [
179
]
},
\\"modules\\": {
\\"byIdentifier\\": {
\\"./test.js\\": 393,
\\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147,
\\"external node-commonjs \\\\\\"path\\\\\\"\\": 17,
\\"ignored|./.|pkgs/somepackage/foo\\": 802
},
\\"usedIds\\": [
17,
147,
393,
802
]
}
}"
`;
exports[`ConfigCacheTestCases records issue-7339 exported tests should write relative dynamic-require paths to records 1`] = `
"{
\\"chunks\\": {
\\"byName\\": {
\\"main\\": 179
},
\\"bySource\\": {
\\"0 main\\": 179
},
\\"usedIds\\": [
179
]
},
\\"modules\\": {
\\"byIdentifier\\": {
\\"./dependencies/bar.js\\": 379,
\\"./dependencies/foo.js\\": 117,
\\"./dependencies|sync|/^\\\\\\\\.\\\\\\\\/.*$/\\": 412,
\\"./test.js\\": 393,
\\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147,
\\"external node-commonjs \\\\\\"path\\\\\\"\\": 17
},
\\"usedIds\\": [
17,
117,
147,
379,
393,
412
]
}
}"
`;
"use strict";const WebpackError = require("../lib/WebpackError");describe("WebpackError", () => { class CustomError extends WebpackError { constructor(message) { super(); this.name = "CustomError"; this.message = "CustomMessage"; this
"use strict";
const formatLocation = require("../lib/formatLocation");
describe("formatLocation", () => {
const testCases = [
{
name: "undefined",
loc: undefined,
result: ""
},
{
name: "null",
loc: null,
result: ""
},
{
"use strict";
const fs = require("fs");
const path = require("path");
/**
* @param {{output: {path: string}}} options options
* @param {RegExp} regexp regexp
* @param {string=} subpath path in output directory
* @returns {string[]} files
*/
module
module.exports = class LogTestPlugin {
constructor(noTraced) {
this.noTraced = noTraced;
}
apply(compiler) {
const logSome = logger => {
logger.group("Group");
if (!this.noTraced) {
logger.error("Error");
logger.warn("Warning");
}
This is a very simple example that shows the usage of the asset module type.Files can be imported like other modules without file-loader.# example.js```javascriptimport png from "./images/file.png";import jpg from "./images/file.jpg";import svg
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Cli should generate the correct cli flags 1`] = `
Object {
"amd": Object {
"configs": Array [
Object {
"description": "You can pass \`false\` to disable AMD support.",
"mult
"use strict";const path = require("path");const fs = require("graceful-fs");const { createFsFromVolume, Volume } = require("memfs");const webpack = require("..");describe("WatchDetection", () => { if (process.env.NO_WATCH_TESTS) { it.skip("lon
"use strict";require("./helpers/warmup-webpack");const path = require("path");// cspell:word nodetestdescribe("NodeTemplatePlugin", () => { jest.setTimeout(20000); it("should compile and run a simple module", done => { const webpack = require(
module.exports = function (done, options, callback) {
return function (err, stats) {
if (err) return done(err);
module.hot
.check(options || true)
.then(updatedModules => {
if (!updatedModules) return done(new Error("No update available"))
"use strict";
const { createFsFromVolume, Volume } = require("memfs");
const util = require("util");
const FileSystemInfo = require("../lib/FileSystemInfo");
const { buffersSerializer } = require("../lib/util/serialization");
describe("FileSystemInfo",