File: validate-options.test.js.snap

package info (click to toggle)
node-expose-loader 5.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,132 kB
  • sloc: javascript: 1,352; makefile: 5
file content (154 lines) | stat: -rw-r--r-- 9,969 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`validate options should throw an error on the "exposes" option with "" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes should be a non-empty string."
`;

exports[`validate options should throw an error on the "exposes" option with "/test/" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes misses the property 'globalName'. Should be:
   non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
   -> The name in the global object.
   -> Read more at https://github.com/webpack-contrib/expose-loader#globalname"
`;

exports[`validate options should throw an error on the "exposes" option with "[""]" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes[0] should be a non-empty string."
`;

exports[`validate options should throw an error on the "exposes" option with "[]" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes should be a non-empty array."
`;

exports[`validate options should throw an error on the "exposes" option with "{"globalName":true}" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes should be one of these:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes
   Details:
    * options.exposes.globalName should be one of these:
      non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
      -> The name in the global object.
      -> Read more at https://github.com/webpack-contrib/expose-loader#globalname
      Details:
       * options.exposes.globalName should be a non-empty string.
       * options.exposes.globalName should be an array:
         [non-empty string, ...] (should not have fewer than 1 item)"
`;

exports[`validate options should throw an error on the "exposes" option with "{"moduleLocalName":true}" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes.moduleLocalName should be a non-empty string.
   -> he name of method/variable/etc of the module (the module must export it)."
`;

exports[`validate options should throw an error on the "exposes" option with "{"override":"test"}" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes.override should be a boolean.
   -> Configure loader to override the existing value in the global object.
   -> Read more at https://github.com/webpack-contrib/expose-loader#override"
`;

exports[`validate options should throw an error on the "exposes" option with "{}" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes misses the property 'globalName'. Should be:
   non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
   -> The name in the global object.
   -> Read more at https://github.com/webpack-contrib/expose-loader#globalname"
`;

exports[`validate options should throw an error on the "exposes" option with "false" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes should be one of these:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes
   Details:
    * options.exposes should be a non-empty string.
    * options.exposes should be an object:
      object { globalName, moduleLocalName?, override? }
    * options.exposes should be an array:
      [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)"
`;

exports[`validate options should throw an error on the "exposes" option with "true" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options.exposes should be one of these:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes
   Details:
    * options.exposes should be a non-empty string.
    * options.exposes should be an object:
      object { globalName, moduleLocalName?, override? }
    * options.exposes should be an array:
      [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)"
`;

exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "[]" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "{"foo":"bar"}" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "{}" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "1" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "false" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "test" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;

exports[`validate options should throw an error on the "unknown" option with "true" value 1`] = `
"Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
   -> List of exposes.
   -> Read more at https://github.com/webpack-contrib/expose-loader#exposes"
`;