vendredi 8 juillet 2016

How to use "rewire" module in my Angular 2 - cli, Karma, Jasmine unit test

I have a file which has few classes. One of them is exported and rest are internally used by it. All those 'used' classes are not exported. I am trying to write a unit test for those non-exported classes and wanted to try 'rewire'module. However, when I try

var rewire = require("rewire")

my Karma, returns me an error

404: base/dist/rewire 

How to handle that error?

Aucun commentaire:

Enregistrer un commentaire