From f3fb205c2a483869fc758e136d8a9bd6099b99b3 Mon Sep 17 00:00:00 2001 From: brad_Dev <50883158+bsrwilliams@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:22:29 +0000 Subject: [PATCH] Update scoping.js Call Module method from the Module.method scope to assign 'bar' to foo otherwise will return undefined --- test/scoping.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/scoping.js b/test/scoping.js index 557c54a..2a3d255 100644 --- a/test/scoping.js +++ b/test/scoping.js @@ -12,6 +12,7 @@ describe('scoping', function () { } Module.prototype.method = function() { + Module(); return this.foo; }; @@ -21,4 +22,4 @@ describe('scoping', function () { expect(mod.req()).toBe('bar'); }); -}); \ No newline at end of file +});