0

I would like to test my javascript code (that includes jQuery library) that is in my CShtml file at a MVC project that runs on visual studio 2015. I know that testing on js files can be done using jasmine.

Can I test a cshtml file using jasmine?

Where can i find a good tutorial on the subject?

Muhammad Qasim
  • 1,622
  • 14
  • 26
avishle
  • 63
  • 1
  • 9

1 Answers1

0

You could use Chutzpah. It is a JavaScript test runner which works fine with Jasmine. It is available as a plug-in for Visual Studio and is easy to setup. It also integrates with the Test Explorer of Visual Studio. The wiki explains the features and how it works.

The following thread can help you:

Setup Jasmine Test Framework on MVC 5

This is a good read too

Community
  • 1
  • 1
Muhammad Qasim
  • 1,622
  • 14
  • 26
  • Thanks, I didn't mention that I'm already using Chutzpah. I've read The other link that you've mention. But also in that link he creates js file in order to check his jasons. So I'm assuming that in the bottom line is that inorder to test my views I should use an utility js file. – avishle Apr 03 '17 at 10:45