File: validate-options.test.js.snap

package info (click to toggle)
node-file-loader 6.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 916 kB
  • sloc: javascript: 1,131; makefile: 5
file content (59 lines) | stat: -rw-r--r-- 3,227 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`validate options should throw an error on the "context" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.context should be a string.
   -> A custom file context (https://github.com/webpack-contrib/file-loader#context)."
`;

exports[`validate options should throw an error on the "emitFile" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.emitFile should be a boolean.
   -> Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile)."
`;

exports[`validate options should throw an error on the "esModule" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.esModule should be a boolean.
   -> By default, file-loader generates JS modules that use the ES modules syntax."
`;

exports[`validate options should throw an error on the "name" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.name should be one of these:
   string | function
   -> The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).
   Details:
    * options.name should be a string.
    * options.name should be an instance of function."
`;

exports[`validate options should throw an error on the "outputPath" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.outputPath should be one of these:
   string | function
   -> A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).
   Details:
    * options.outputPath should be a string.
    * options.outputPath should be an instance of function."
`;

exports[`validate options should throw an error on the "publicPath" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.publicPath should be one of these:
   string | function
   -> A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).
   Details:
    * options.publicPath should be a string.
    * options.publicPath should be an instance of function."
`;

exports[`validate options should throw an error on the "regExp" option with "true" value 1`] = `
"Invalid options object. File Loader has been initialized using an options object that does not match the API schema.
 - options.regExp should be one of these:
   string | RegExp
   -> A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).
   Details:
    * options.regExp should be a string.
    * options.regExp should be an instance of RegExp."
`;