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 143 forks source link

CustomTestHarnessPath path resolution difficult to use with inherited settings #808

Open wnayes opened 2 years ago

wnayes commented 2 years ago

If the CustomTestHarnessPath setting is defined in an ancestor/parent settings file, and there are multiple settings files in the inheritance hierarchy, the harness path will be resolved relative to the settings file closest to the test spec files rather than the settings file that defined it.

This makes it difficult to use the CustomTestHarnessPath setting in a shared way across a repository. I'd expect a relative path to resolve relative to the config file that defined it, or some way to configure this type of behavior (similar to SettingsFileAdjacent for other settings).

Example

// C:\repo\chutzpah.json
{
    "CustomTestHarnessPath": "TestHarness\\Harness.html"
}

// C:\repo\a\b\c\chutzpah.json
{
    "InheritFromParent": true,
}

When running a test that uses the C:\repo\a\b\c\chutzpah.json, the harness path seems to resolve against C:\repo\a\b\c\ instead of C:\repo\ where the parent settings file is. For any relative path, this typically means it will break.

stale[bot] commented 2 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.