You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -63,6 +65,20 @@ Did you mean \`td.object(['${name}'])\`?\
63
65
}
64
66
}
65
67
68
+
varensureFunctionIsNotPassed=()=>
69
+
log.error('td.object',`Functions are not valid arguments to \`td.object\` (as of [email protected]). Please use \`td.function()\` or \`td.constructor()\` instead for creating fake functions.`)
70
+
71
+
varensureOtherGarbageIsNotPassed=()=>
72
+
log.error('td.object',`\
73
+
To create a fake object with td.object(), pass it a plain object that contains
74
+
functions, an array of function names, or (if your runtime supports ES Proxy
75
+
objects) a string name.
76
+
77
+
If you passed td.object an instance of a custom type, consider passing the
78
+
type's constructor to \`td.constructor()\` instead.
79
+
`)
80
+
81
+
66
82
varwithDefaults=(config)=>
67
83
_.extend({},DEFAULT_OPTIONS,config)
68
84
@@ -75,6 +91,3 @@ var nameOf = (nameOrType) =>
75
91
_.isString(nameOrType)
76
92
? nameOrType
77
93
: ''
78
-
79
-
varensureFunctionIsNotPassed=()=>
80
-
log.error('td.object',`Functions are not valid arguments to \`td.object\` (as of [email protected]). Please use \`td.function()\` or \`td.constructor()\` instead for creating fake functions.`)
0 commit comments