Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline messages only appear once #822

Closed
adrianfaciu opened this issue Oct 10, 2016 · 7 comments
Closed

Inline messages only appear once #822

adrianfaciu opened this issue Oct 10, 2016 · 7 comments
Labels

Comments

@adrianfaciu
Copy link

Issue description or question

Working on creating a wallabyjs config file for an angular2-seed based project. I have a basic first version up and running, but the inline error messages only appear first time.

If a test is failing and I start wallabyjs, the error message is shown inline, but after an edit is done it no longer shows up. If all the tests are passing and I start wallabyjs and break a test the message will show up. However after first edit it will disappear for good.

I've followed the documentation and since the project is using systemjs I've used the electron test runner to get the inline messages. Feeling like I'm missing something obvious but can't figure out what.

Can provide wallabyjs debug messages if needed.

Wallaby.js configuration file

Repo and wallabyjs.config is here.

Code editor or IDE name and version

Tested in both:
Visual Studio Code v1.5.3
IntelliJ IDEA 2016.2.4

OS name and version

Windows 10 (Version 1607 Build 14393.222)

@ArtemGovorov
Copy link
Member

Nice find! It was a bug reproducible in certain environment conditions (Electron, System.js, Angular). The issue is fixed and the fix is published in wallaby core 1.0.304.

I have also brushed up your wallaby config a bit:

  • removed TS compiler manual loading, wallaby.js is loading the tsconfig.json from your project root automatically, the manual loading is only required if the file is not under the project's root.
  • added the src/client/app/operators file preloading before tests. Currently running all tests will pass because the src/client/app/app.component.spec.ts loads the src/client/app/operators file. But when you're editing a spec when wallaby.js is running, like src/client/app/shared/name-list/name-list.service.spec.ts spec, wallaby only runs the changed test, so the src/client/app/operators file is not loaded anymore and this code in the src/client/app/shared/name-list/name-list.service.ts file will fail:
return this.http.get('/assets/data.json')
                    .map((res: Response) => res.json())...

because there's no map operator loaded.

Hope it makes sense. Please let me know if this work for you now.

@adrianfaciu
Copy link
Author

Thanks for the quick reply.
On the same setup, after an update and a quick look it seems like it tries to load electron and fails:

​​[Error] Error: Cannot find module 'electron'
​​
​​[Error]     at Function.Module._resolveFilename (module.js:455:15)
​​
​​[Error]     at Function.Module._load (module.js:403:25)
​​
​​[Error]     at Module.require (module.js:483:17)
​​
​​[Error]     at require (internal/module.js:20:19)
​​
​​[Error]     at Object.<anonymous> (C:\Users\adrian.faciu\.vscode\extensions\WallabyJs.wallaby-vscode-1.0.28\wallaby\runners\browser\electronHost.js:14:18)

I'll get back with more info once I have a few minutes to investigate this. Might just need to install the package or something.

@ArtemGovorov
Copy link
Member

@adrianfaciu It's weird, there's been no changes that could affect it neither in the core, nor in the config. Try re-installing the electron-prebuilt module.

@adrianfaciu
Copy link
Author

Might be related to VS Code. I've cloned the repository in a new folder and did npm install and got the same result. Reinstalling wallabyjs made no difference.

However everything seems to work just fine inside IntelliJ and I can confirm that the problem with the inline message is fixed.

I'll try to see what's with VS Code. Maybe it's related to latest 1.6 update, when I initially reproduced this I was using 1.5.3.

@ArtemGovorov
Copy link
Member

Hmm, it's definitely related to VS Code. I have reproduced the issue in 1.6, however 1.5.3 is working fine. Will investigate.

@ArtemGovorov
Copy link
Member

Fixed the VS Code specific issue and published the fix in wallaby core 1.0.305.

@adrianfaciu
Copy link
Author

Works perfectly now. Thanks for the help.
Great support and awesome product 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants