{"action":"created","issue":{"url":"https://api.github.com/repos/wallabyjs/public/issues/402","labels_url":"https://api.github.com/repos/wallabyjs/public/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/wallabyjs/public/issues/402/comments","events_url":"https://api.github.com/repos/wallabyjs/public/issues/402/events","html_url":"https://github.com/wallabyjs/public/issues/402","id":126985027,"number":402,"title":"Caught between two use cases","user":{"login":"karlnp","id":3675735,"avatar_url":"https://avatars.githubusercontent.com/u/3675735?v=3","gravatar_id":"","url":"https://api.github.com/users/karlnp","html_url":"https://github.com/karlnp","followers_url":"https://api.github.com/users/karlnp/followers","following_url":"https://api.github.com/users/karlnp/following{/other_user}","gists_url":"https://api.github.com/users/karlnp/gists{/gist_id}","starred_url":"https://api.github.com/users/karlnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlnp/subscriptions","organizations_url":"https://api.github.com/users/karlnp/orgs","repos_url":"https://api.github.com/users/karlnp/repos","events_url":"https://api.github.com/users/karlnp/events{/privacy}","received_events_url":"https://api.github.com/users/karlnp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wallabyjs/public/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-16T00:16:10Z","updated_at":"2016-01-18T19:43:30Z","closed_at":null,"body":"Hi Artem. I have to say, kudos on your dedicated support of Wallaby - I've had so much trouble that ordinarily I'd begin to regret my purchase, but it's really gratifying to see you being proactive and helpful. That said:\r\n\r\nI think I'm running up against a fundamental difference in how my project works vs wallaby's assumptions of the kinds of projects it would be used to test.\r\n\r\nHere's how my project works standalone and with karma as a test runner:\r\n\r\n* Webpack compiles and translates the application code, which is a mix of ES5 and ES2015 and ES7\r\n\t* Webpack injects build-contextual constants via the DefinePlugin, which essentially adds global string vars that tell the app which art assets and config values to use\r\n\t* Javascript is run through Babel with es2015, stage-0, and react presents, as well as transforms to render decorators, which is needed for a third-party plugin. here the build constant symbols are replaced with strings.\r\n\t* the constants are also injected into SCSS, and the result is interpreted with a chain of loaders: constants -> sass-loader -> css-loader -> style-loader. The css-loader resolves most of the constants into urls and then into file references or data URIs, as appropriate. Ignored in Wallaby.\r\n\t* the result of the above is added as a `style` attribute to the JSX components which make up the views of the app. Ignored in Wallaby.\r\n\t* the whole thing is bundled up with dependencies (important) and made browser-friendly (less important)\r\n\r\nSo Webpack runs in a node environment, as is necessary, and the tests are written using fgnass/domino, so they are also able to run in node even though they often depend on browser activity (eg. testing iframe messaging.) I don't understand why I can run PhantomJS2 with karma and have the tests execute, but wallaby has trouble with the same setup. Although wallaby itself reliably executes the config file, it doesn't seem to run Webpack before Babel, as it uses node's module.js to compile and execute the `files` argument.\r\n\r\nI would be able to cut out webpack completely, but I need the build constant plugin - and really, I don't want to miss any potential problems that it might introduce. For example, using the compiler option in wallaby alerted me to the fact that the order you define presets in is important - having stage-0 before es2015 really made a mess until I figured that out, even though it seems to matter less when using Webpack loaders.\r\n\r\nSo, that's my overall usecase. Any ideas on how I can defer executing the javascript until after Webpack has injected the constants? I'm attaching my config below (again). Like you saw yesterday, I've tried to have it served in the browser & tests run against that, but ran into other problems (namely the inability to `require` things - Webpack doesn't run first then either, it seems.)\r\n\r\nhttp://pastebin.com/wbhXq4Wy"},"comment":{"url":"https://api.github.com/repos/wallabyjs/public/issues/comments/172632337","html_url":"https://github.com/wallabyjs/public/issues/402#issuecomment-172632337","issue_url":"https://api.github.com/repos/wallabyjs/public/issues/402","id":172632337,"user":{"login":"karlnp","id":3675735,"avatar_url":"https://avatars.githubusercontent.com/u/3675735?v=3","gravatar_id":"","url":"https://api.github.com/users/karlnp","html_url":"https://github.com/karlnp","followers_url":"https://api.github.com/users/karlnp/followers","following_url":"https://api.github.com/users/karlnp/following{/other_user}","gists_url":"https://api.github.com/users/karlnp/gists{/gist_id}","starred_url":"https://api.github.com/users/karlnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlnp/subscriptions","organizations_url":"https://api.github.com/users/karlnp/orgs","repos_url":"https://api.github.com/users/karlnp/repos","events_url":"https://api.github.com/users/karlnp/events{/privacy}","received_events_url":"https://api.github.com/users/karlnp/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T19:43:30Z","updated_at":"2016-01-18T19:43:30Z","body":"It looks like the babel-loader isn't triggering? If I add an `import` statement to my test it fails there at the same place in `wallaby-webpack`: `WallabyInputFileSystem:30`, and then down the Webpack chain to NormalModuleMixin/NormalModule.js.\r\n\r\n```\r\nModuleParseError: Module parse failed: .\\app\\game-wrappers\\gamesInterface-Test.js Line 3: Unexpected token\r\nYou may need an appropriate loader to handle this file type.\r\n| $_$wp(27);\r\n| var domino = ($_$w(27, 0), require('domino'));\r\n| import gamesInterface from './gamesInterface';\r\n| $_$w(27, 1), describe('gamesInterface', function () {\r\n|     $_$wf(27);\r\n  at DependenciesBlock.<anonymous> (C:\\Users\\Karl\\git\\gtp\\node_modules\\webpack\\lib\\NormalModule.js:113:20)\r\n  at DependenciesBlock.onModuleBuild (C:\\Users\\Karl\\git\\gtp\\node_modules\\webpack\\node_modules\\webpack-core\\lib\\NormalModuleMixin.js:310:10)\r\n  at nextLoader (C:\\Users\\Karl\\git\\gtp\\node_modules\\webpack\\node_modules\\webpack-core\\lib\\NormalModuleMixin.js:275:25)\r\n  at C:\\Users\\Karl\\git\\gtp\\node_modules\\webpack\\node_modules\\webpack-core\\lib\\NormalModuleMixin.js:259:5\r\n  at C:\\Users\\Karl\\git\\gtp\\node_modules\\wallaby-webpack\\lib\\WallabyInputFileSystem.js:30:11\r\n  at doNTCallback0 (node.js:419:9)\r\n  at process._tickCallback (node.js:348:13)\r\n```"}}