Evening! I’ve been trying to get testing working in my ionic3 project. I have been using the example from ionic-unit-testing-example repo, but I can’t seem to get it working. The example repo (https://github.com/driftyco/ionic-unit-testing-example) is running ionic2, but I made a PR for upgrading it to 3.1.1. Got the testing working under this PR: https://github.com/driftyco/ionic-unit-testing-example/pull/31.
However in my real project, with exactly the same dependencies and setup I keep getting cryptic errors which hint that I am using a wrong target for webpack. The error I’m getting is
Uncaught Error: Cannot find module "fs", which hints that module “fs” is not accessible by webpack. This would imply
target: 'node' rather than the default
target: 'web' for webpack config… I’m using exactly the same setup as in the PR shown above, and am stumped after several days of trying to figure it out. Any hints on what else could I try or how to debug would be extremely helpful. Thank you!