I have an angularJS application and now I would like to start testing it. So I have watched a few tutorials, but none of them show you how to set up testing with visual studio 2015. Does anyone know about a good resource to read or can help me set it up.
The questions I have are:
Any help given will be awesome.
I will recommend you to try Chutzpah (can be plugged in VS2015), it works with Jasmine, you can see test results in the VS output console and also in browser.
Chutzpah on Github
Chutzpah extensions for VS
My Helloworld examples on VS2015 with Chutzpah:
helloworld.js :
function helloWorld(){
return "Hello world!";
}
function examples() {
return package = {
first: 13,
second: 13,
third: "gone"
}
}
helloworldspec.js :
/// <reference path="helloworld.js" />
describe("Hello world", function () {
it("says hello", function() {
expect(helloWorld()).toContain("Hello");
});
});
describe("Examples", function () {
it("examples", function () {
expect(examples().first).toBe(13);
expect(examples().third).not.toBe(13);
expect(examples().third).not.toMatch(/gz/);
expect(examples().third).toMatch('go');
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With