-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBuilder.test.ts.snap
71 lines (36 loc) · 4.07 KB
/
Builder.test.ts.snap
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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Builder and() errors if no keys are defined 1`] = `"AND requires a list of field names."`;
exports[`Builder checkAnd() errors if not all options are defined 1`] = `"All of these fields must be defined: foo, bar, baz"`;
exports[`Builder checkCustom() is passed entire options object 1`] = `"Invalid field \\"error\\". This will error!"`;
exports[`Builder checkCustom() triggers callback function 1`] = `"Invalid field \\"error\\". This will error!"`;
exports[`Builder checkOnly() errors if value doesnt match the default value 1`] = `"Invalid field \\"key\\". Value may only be \\"foo\\"."`;
exports[`Builder checkOr() errors if not 1 option is defined 1`] = `"At least one of these fields must be defined: foo, bar, baz"`;
exports[`Builder checkType() array errors on non-arrays 1`] = `"Invalid field \\"key\\". Must be an array."`;
exports[`Builder checkType() boolean errors on non-booleans 1`] = `"Invalid field \\"key\\". Must be a boolean."`;
exports[`Builder checkType() function errors on non-functions 1`] = `"Invalid field \\"key\\". Must be a function."`;
exports[`Builder checkType() number errors on non-numbers 1`] = `"Invalid field \\"key\\". Must be a number."`;
exports[`Builder checkType() object errors on arrays 1`] = `"Invalid field \\"key\\". Must be a plain object."`;
exports[`Builder checkType() object errors on non-objects 1`] = `"Invalid field \\"key\\". Must be a plain object."`;
exports[`Builder checkType() object errors on nulls 1`] = `"Invalid field \\"key\\". Must be a plain object."`;
exports[`Builder checkType() string errors on non-strings 1`] = `"Invalid field \\"key\\". Must be a string."`;
exports[`Builder checkXor() errors if more than 1 option is defined 1`] = `"Only one of these fields may be defined: foo, bar, baz"`;
exports[`Builder checkXor() errors if no options are defined 1`] = `"Only one of these fields may be defined: foo, bar, baz"`;
exports[`Builder constructor() errors if default value is undefined 1`] = `"A default value for type \\"string\\" is required."`;
exports[`Builder deprecate() errors for empty value 1`] = `"A non-empty string is required for deprecated messages."`;
exports[`Builder deprecate() errors for non-string value 1`] = `"A non-empty string is required for deprecated messages."`;
exports[`Builder invariant() errors if condition is false 1`] = `"Failure"`;
exports[`Builder invariant() includes a class name 1`] = `"Invalid FooBar field \\"foo.bar\\". Failure"`;
exports[`Builder invariant() includes a class name when no path 1`] = `"FooBar. Failure"`;
exports[`Builder invariant() includes a file and class name 1`] = `"Invalid FooBar field \\"foo.bar\\" in package.json. Failure"`;
exports[`Builder invariant() includes a file name 1`] = `"Invalid field \\"foo.bar\\" in package.json. Failure"`;
exports[`Builder invariant() includes an option path 1`] = `"Invalid field \\"foo.bar\\". Failure"`;
exports[`Builder message() errors for empty value 1`] = `"A non-empty string is required for custom messages."`;
exports[`Builder message() errors for non-string value 1`] = `"A non-empty string is required for custom messages."`;
exports[`Builder only() errors if default value is not the same type 1`] = `"Only requires a default string value."`;
exports[`Builder or() errors if no keys are defined 1`] = `"OR requires a list of field names."`;
exports[`Builder runChecks() errors if value passed is null and builder is non-nullable 1`] = `"Invalid field \\"key\\". Null is not allowed."`;
exports[`Builder runChecks() errors if value passed is undefined and builder is required 1`] = `"Invalid field \\"key\\". Field is required and must be defined."`;
exports[`Builder runChecks() runs default type of check 1`] = `"Invalid field \\"key\\". Must be a string."`;
exports[`Builder runChecks() uses custom message 1`] = `"Invalid field \\"key\\". Oops, something is broken."`;
exports[`Builder xor() errors if no keys are defined 1`] = `"XOR requires a list of field names."`;
exports[`func() errors if a non-function value is used 1`] = `"Invalid field \\"key\\". Must be a function."`;