mmanela / chutzpah

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha and TypeScript.
http://mmanela.github.io/chutzpah/
Apache License 2.0
550 stars 142 forks source link

Test runner reports "cannot find path" errors for ajax urls #757

Closed bmmohanty closed 4 years ago

bmmohanty commented 5 years ago

I am trying to test my JS file using Chutzpah and QUnit and it is erroring out for the ajax calls. The error line is as follows:

"Error: Error opening D:/xxxxx/xxxxx/UI/Tests/DummyController/DummyAction: The system cannot find the path specified."

My JS AJAX Section code is as below:

$.ajax({ url: "/DummyController/DummyAction", type: "POST", data: SampleModelData, success: function (result) {
}, error: function (err) { alert("Error Occured"); } });

mmanela commented 5 years ago

Can you share your chutzpah.json file?

bmmohanty commented 5 years ago

Can you share your chutzpah.json file?

Sure.. here it is...

{
  "Framework": "qunit",
  "RootReferencePathMode": "SettingsFileDirectory",
  "EnableTestFileBatching": true,
  "TestFileTimeout": 10000,
  "Compile": {
    "UseSourceMaps": true,
    "Paths": [
      {
        "SourcePath": "../",
        "OutputPath": "../"
      }
    ]
  },
  "References": [
    {
      "Path": "Tests/jquery.js",
      "IsTestFrameworkFile": true
    },
    {
      "Path": "../../xxxxxxxxxxxxx/wwwroot/js",
      "Includes": [ "*.js" ],
      "Excludes": ["jquery.js"],
      "IsTestFrameworkFile": true
    }
  ],
  "Tests": [
    {
      "Path": "Tests",
      "Includes": [ "*_test.js" ]
    }
  ]
}
mmanela commented 5 years ago

Can you try turning on server mode by adding this


"Server" : {
  "Enabled": true
}
bmmohanty commented 5 years ago

Tried the same thing, but no lock. Still the error is running one.

mmanela commented 5 years ago

Can you run with the /trace flag and share the chutpah.log file?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.