Typescript testing in Jasmine in Visual Studio

I watched three days right now, and I have big problems finding a good guide for this installation:

Purpose : unit testing of functions created by developers in our team.

The solution uses Visual Studio 2015 (+ Resharper).

The solution contains a web project, which is an Angular2 website, with code written in typescript. This typescript is what should be checked by the module.

What did I manage to do . Set up Jasmine as a standalone project in the solution. It works, I can create tests that test themselves (expect (7 + 1) .toBe (8)).

What I did not manage to do . Set up Jasmine to be able to compile .ts files on the fly (I think?) To be able to link to and test .ts files.

TL DR: I need help creating a Visual Studio project in an existing Angular2 solution that will allow me to use Jasmine for unit test typescript files. (Maybe someone came across a guide that will help).

+4
source share

Source: https://habr.com/ru/post/1653136/


All Articles