I am building Angular.js application based on gulp
building system and decided to move to typescript. I don't use the module system for managing source files as I have gulp-angular-filesort
that handles the ordering.
Never the less there is still one place in the application where I could use some module loader/manager.
Before execution of my unit tests (Jasmine) I need to set up big mock data sets. As they are used in different test files, I've moved them out into *spec.factory.js
files for readability and having single responsibility. The issue is that I can't just include all *spec.factory.js
because the order of some files matter.
I have file responsible for single item in response collection item.spec.factory
and file where the response is created - read collection from items is formed - response.spec.factory
.
I'm using karma to run this and wonder if there is a way to require
item.spec.factory
in the response.spec.factory
file by Typescript means, so I can abandom specifying the order of files in karma.conf.js
and just add there one line: *spec.factory.js
to get all factories.
Aucun commentaire:
Enregistrer un commentaire