Running Chutzpah with TypeScript the compiled .js files are placed in the same folder as the .ts file.
This causes issues with bundling since a bundle could include all .js in a folder which (after running test with Chutzpah) includes the .js files that chutzpah has compiled.
Bundling a complete folder is very common if you have a large amount of .ts files.
Is it possible to :
- have a testfolder that contains all reccessary files for the test:
- .html in the root
- the root is the common folder base for all testfiles.
- configure the testfolder path,
Example:
Test structure:
- C:\Projects\Solution1\TestProject\BrowserTest.ts
- C:\Projects\Solution1\WebApplicaition1\Scripts\BrowserTest.ts
- TestFolder path: C:\Projects\Solution1\TestProject\TestsCache
This would give the testfolder:
Root: C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0
Contents:
- C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0\TestProject\BrowserTest.js
- C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0\WebApplicaition1\Scripts\BrowserTest.js
- C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0\_Chutzpah.test.html
Pros:
- All files for a testrun within a folder
- No conflict with bundling when running the site, since the .js files that chutzpah compiles is placed in a text folder outside the webapplication.
This causes issues with bundling since a bundle could include all .js in a folder which (after running test with Chutzpah) includes the .js files that chutzpah has compiled.
Bundling a complete folder is very common if you have a large amount of .ts files.
Is it possible to :
- have a testfolder that contains all reccessary files for the test:
- .html in the root
- the root is the common folder base for all testfiles.
- configure the testfolder path,
Example:
Test structure:
- C:\Projects\Solution1\TestProject\BrowserTest.ts
- C:\Projects\Solution1\WebApplicaition1\Scripts\BrowserTest.ts
- TestFolder path: C:\Projects\Solution1\TestProject\TestsCache
This would give the testfolder:
Root: C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0
Contents:
- C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0\TestProject\BrowserTest.js
- C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0\WebApplicaition1\Scripts\BrowserTest.js
- C:\Projects\Solution1\TestProject\TestsCache\c108fc155bec3def8d323ea7928455c0\_Chutzpah.test.html
Pros:
- All files for a testrun within a folder
- No conflict with bundling when running the site, since the .js files that chutzpah compiles is placed in a text folder outside the webapplication.