Monday, 15 May 2017

How can I use jasmine with a server-side typescript project?

I have a project that contains modules for both the server and client of my application, which are each built using webpack. I'm using Karma with Jasmine to test my client (which uses Angular) and I would like to use Jasmine to test the server, which is written in typescript, too.

Unfortunately, the only guides that I could find online used jasmine-node (which to be untouched for the past few years) instead of jasmine-npm. Can anyone suggest a way that I can use Jasmine, or an alternative, for testing within my project?

I've tried writing a jasmine.json file, or editing the one generated by jasmine with the init cli command, however this doesn't seem to work with typescript files.

At the moment, my project's structure is like so:

├── client
│   ├── karma.conf.js
│   ├── protractor.conf.js
│   ├── src
│   ├── tsconfig.json
│   └── webpack.config.js
├── server
│   ├── src
│   ├── tsconfig.json
│   └── webpack.config.js
└── node_modules



via mickliddy

No comments:

Post a Comment