Closed PramodMn007 closed 4 years ago
Can you share your chutzpah.json file contents?
Hi Mmanela,
Here goes my Chutzpah.json file.
{
"Framework": "jasmine",
"FrameworkVersion": "2.6.4",
"RootReferencePathMode": "SettingsFileDirectory",
"EnableTestFileBatching": true,
"TestFileTimeout": 10000,
"References": [
{ "Path": "./Scripts/jasmine/jasmine.js" },
{ "Path": "./script.js" },
{ "Path": "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js" }
],
"Tests": [
{
"Path": "",
"Includes": [ "*_Tests.js" ]
}
],
"CodeCoverageExecutionMode": "Always",
"CodeCoverageIncludes": [ "./script.js" ],
"CodeCoverageExcludes": [ "./Scripts/jasmine/*.js", "./Tests/*_Tests.js" ],
"Transforms": [
{ "Name": "lcov", "Path": "lcov.lcov" }
]
}
Also , I have a reference for Jquery in my Test JS File.
Couple things.
{ "Path": "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js" , "IsTestFrameworkFile": true }
Using IsTestFrameworkFile property resolved the Issue. Thanks a Lot...
Also I'm facing TypeError on String Includes function. Error: Message: TypeError: undefined is not a constructor (evaluating 'str.includes("world")')
Function is pretty simple.
//str is of type string
function stringincludes(str) {
var n = str.includes("world");
return n;
}
Works fine on Jasmine standalone Test, Facing the issue when I run it through Test Explorer
Which engine are you running Chutzpah with? By default still it uses Phantom which has older version of ECMAscript, if you use JsDom or Chrome engines newer Js function will work.
Hi Mmanela,
I'm using Default Phantom engine.. Can you guide me, on using chrome engine?
Thanks & Regards, Pramod
See this page https://github.com/mmanela/chutzpah/wiki/Browser-Engines
Thanks a lot...I will check this out...
Getting Reference error on Jquery Sign , even after adding Jquery Reference(Complete URL not Local Jquery path) in JS Test file.
\\\ <reference path="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"/>
Happening both in VSTest Azure Devops Task & Chutzpah test Adapter for Visual Studio