shortest
shortest copied to clipboard
refactor(config): update config to detect test.ts files instead of files under test dir
Fix: #190
@khalatevarun is attempting to deploy a commit to the Antiwork Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| shortest | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 29, 2024 9:56am |
Lint and shortest tests are failing
May also want to version this as a breaking change. Can be minor as small and early
Shortest workflow is failing with this error. I am getting a similar issue locally. Another issue that came up is when deleting node_modules and building and installing the package again, some of the packages are not resolving properly. Shown in the last image below.
^ our fault? I still think we should remove pnpm and go to npm.
If someone else could replicate that and fix, would be great. Don't think anything in this branch would cause it, and someone else reported that there may be inconsistencies in the node modules based on npx vs using pnpm in places.
How does this work if there's a set of tests I don't want to run, or a folder I only want to run tests for, temporarily (via CLI)?
I can see a call to getConfig here in bin.ts -> main, before the initialize is called.
and getConfig throws if the globalConfig is not present.
but anything changed recently on this logic ?
Another issue that came up is when deleting node_modules and building and installing the package again, some of the packages are not resolving properly. Shown in the last image below.
I tried reproducing this, but no luck. here are the steps i took,
- removed
node_modulesfrompackages/shortest& rootnode_modules pnpm iat the workspace root
no issue with the imports. may be you can try reloading vscode and see it it fixs the issue. ( Cmd+Shift+P -> Developer: Relaod Window ), sometimes it happens.
Just posting it here again in case you missed it:
You're right. with the new implementation we should first initialize the runner and then initialize the config: This should fix it:
try {
const runner = new TestRunner(
process.cwd(),
true,
headless,
targetUrl,
debugAI
);
await runner.initialize();
const config = getConfig();
const testPattern = cliTestPattern || config.testPattern;
await runner.runTests(testPattern);
}
Let me know if you need the full code for this.
Another issue that came up is when deleting node_modules and building and installing the package again, some of the packages are not resolving properly. Shown in the last image below.
I tried reproducing this, but no luck. here are the steps i took,
- removed
node_modulesfrompackages/shortest& rootnode_modulespnpm iat the workspace rootno issue with the imports. may be you can try reloading vscode and see it it fixs the issue. (
Cmd+Shift+P -> Developer: Relaod Window), sometimes it happens.
Please merge main to include a new caching feature!
Would be great to merge this soon so I can use this new approach :)
Would be great to get to this soon. If it's not done by Friday we'll have some internally do it as I think this is quite important!
Would be great to get to this soon. If it's not done by Friday we'll have some internally do it as I think this is quite important!
Updated the branch and resolved the issue.