We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 036feec + 853f0dd commit 219b0d0Copy full SHA for 219b0d0
async.test.js
@@ -826,6 +826,17 @@ modes.forEach((logic) => {
826
).toBe(null)
827
})
828
829
+ test('allow access to objects named as their methods', async () => {
830
+ expect(
831
+ await logic.run(
832
+ {
833
+ var: 'toString'
834
+ },
835
+ {toString: 'hello'}
836
+ )
837
+ ).toBe("hello")
838
+ })
839
+
840
test('allow access to functions on objects when enabled', async () => {
841
logic.allowFunctions = true
842
expect(
defaultMethods.js
@@ -217,7 +217,7 @@ const defaultMethods = {
217
return notFound
218
}
219
220
- if (engine.allowFunctions || typeof (context && context[key]) !== 'function') {
+ if (engine.allowFunctions || typeof context !== 'function') {
221
return context
222
223
return null
0 commit comments