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

Ionic 5 / Angular 8 #2181

Closed
derekkinzo opened this issue Aug 18, 2019 · 2 comments
Closed

Ionic 5 / Angular 8 #2181

derekkinzo opened this issue Aug 18, 2019 · 2 comments

Comments

@derekkinzo
Copy link

Issue description or question

Configure wallaby for ionic project. See repo here: https://github.com/derekkinzo/ionic-wallaby

Wallaby.js configuration file

https://github.com/derekkinzo/ionic-wallaby/blob/master/wallaby.js

Code editor or IDE name and version

Visual Studio Code v1.37.1

OS name and version

OSX Mojave 10.14.6

@smcenlly
Copy link
Member

Thanks for the sample repo! The reason this isn't working is because your polyfills.ts file is referencing zone-flags with a TypeScript file extension (.ts). You can fix this by changing your import:

- import './zone-flags.ts';
+ import './zone-flags';

With that change, everything will work for you.

Wallaby for webpack does not support file imports with explicit .ts extension, because Wallaby's TypeScript compiler renames .ts files to .js. You could add a preprocessor to rename compiled files back to .ts, but removing the .ts should work for you (with and without Wallaby). You can read more in this previous issue.


Regarding your other issue that you mention in our forums, asset.slice is not a function.:

This issue was caused by our configuration assuming that your test assets were limited to file-based assets and not globs. We've update our configuration to only work for file-based assets which means that you may use the configuration from our website without any changes. If you need access to assets from your tests, then you will have to configure them to be loaded in the middleware section.

@derekkinzo
Copy link
Author

Worked great. Thanks!

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

No branches or pull requests

2 participants