{"action":"created","issue":{"url":"https://api.github.com/repos/wallabyjs/public/issues/1570","repository_url":"https://api.github.com/repos/wallabyjs/public","labels_url":"https://api.github.com/repos/wallabyjs/public/issues/1570/labels{/name}","comments_url":"https://api.github.com/repos/wallabyjs/public/issues/1570/comments","events_url":"https://api.github.com/repos/wallabyjs/public/issues/1570/events","html_url":"https://github.com/wallabyjs/public/issues/1570","id":307306212,"number":1570,"title":"Error using proxyquire when running with wallaby.js on Node","user":{"login":"alexmbrown","id":10518702,"avatar_url":"https://avatars3.githubusercontent.com/u/10518702?v=4","gravatar_id":"","url":"https://api.github.com/users/alexmbrown","html_url":"https://github.com/alexmbrown","followers_url":"https://api.github.com/users/alexmbrown/followers","following_url":"https://api.github.com/users/alexmbrown/following{/other_user}","gists_url":"https://api.github.com/users/alexmbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/alexmbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexmbrown/subscriptions","organizations_url":"https://api.github.com/users/alexmbrown/orgs","repos_url":"https://api.github.com/users/alexmbrown/repos","events_url":"https://api.github.com/users/alexmbrown/events{/privacy}","received_events_url":"https://api.github.com/users/alexmbrown/received_events","type":"User","site_admin":false},"labels":[{"id":150744620,"url":"https://api.github.com/repos/wallabyjs/public/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-21T15:54:48Z","updated_at":"2018-03-21T22:07:24Z","closed_at":"2018-03-21T22:07:24Z","author_association":"NONE","body":"### Issue description or question\r\n\r\nI'm receiving the following error when I attempt to require another file using proxyquire `TypeError: Cannot read property 'split' of undefined` from the line invoking the proxyquire method when running my tests. I do not receive this error when I use the jasmine test runner. Here is an example of when the error occurs\r\n\r\nexample.js:\r\n```\r\nconst foo = require('../foo')\r\n\r\nmodule.exports = function getFoo() {\r\n  return 'hello ' + foo();\r\n}\r\n```\r\n\r\nexample.spec.js:\r\n```\r\nconst proxyquire = require('proxyquire')\r\n\r\ndescribe('Example', () => {\r\n  let fooBar\r\n  let foo\r\n\r\n  beforeEach(() => {\r\n    foo = {\r\n      bar: 'mock bar'\r\n    }\r\n\r\n    fooBar = proxyquire('./example.js', {\r\n      '../foo': () => 'world'\r\n    })\r\n  })\r\n    \r\n  it('should log \"hello world\"', () => {\r\n    console.log(fooBar.getFoo())\r\n  })\r\n})\r\n```\r\n\r\n### Wallaby.js configuration file\r\n\r\n```javascript\r\n'use strict'\r\n\r\nmodule.exports = function () {\r\n  return {\r\n    files: [\r\n      'src/**/*.js',\r\n      {pattern: 'src/**/*spec.js', ignore: true}\r\n    ],\r\n    tests: [\r\n      'src/**/*spec.js'\r\n    ],\r\n    env: {\r\n      type: 'node'\r\n    },\r\n    testFramework: 'jasmine'\r\n  }\r\n}\r\n\r\n```\r\n\r\n### Code editor or IDE name and version\r\n\r\nWebStorm v2017.3\r\n\r\n### OS name and version\r\n\r\nOSX\r\n"},"comment":{"url":"https://api.github.com/repos/wallabyjs/public/issues/comments/375111904","html_url":"https://github.com/wallabyjs/public/issues/1570#issuecomment-375111904","issue_url":"https://api.github.com/repos/wallabyjs/public/issues/1570","id":375111904,"user":{"login":"ArtemGovorov","id":979966,"avatar_url":"https://avatars1.githubusercontent.com/u/979966?v=4","gravatar_id":"","url":"https://api.github.com/users/ArtemGovorov","html_url":"https://github.com/ArtemGovorov","followers_url":"https://api.github.com/users/ArtemGovorov/followers","following_url":"https://api.github.com/users/ArtemGovorov/following{/other_user}","gists_url":"https://api.github.com/users/ArtemGovorov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtemGovorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtemGovorov/subscriptions","organizations_url":"https://api.github.com/users/ArtemGovorov/orgs","repos_url":"https://api.github.com/users/ArtemGovorov/repos","events_url":"https://api.github.com/users/ArtemGovorov/events{/privacy}","received_events_url":"https://api.github.com/users/ArtemGovorov/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T22:07:24Z","updated_at":"2018-03-21T22:07:24Z","author_association":"OWNER","body":"Thanks for the report. The issue is fixed and the fix is published in [the latest core version](https://wallabyjs.com/docs/intro/troubleshooting.html#forcing-wallabyjs-core-update).\r\n\r\nNote that your test needs to be modified to pass (with or without wallaby), because a function is exported from the `example.js` module:\r\n\r\n```diff\r\n  it('should log \"hello world\"', () => {\r\n-   console.log(fooBar.getFoo())\r\n+   console.log(fooBar())\r\n  })\r\n```"}}
{"actor":{"display_login":"ArtemGovorov"}}