-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nx-plugin): move tests from 'tests' to 'src' directory #19866
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 23f01a3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 4 targets
Sent with 💌 from NxCloud. |
e5ad7e9
to
ec43936
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better in src
. Thank you for the contribution! 🎉
(cherry picked from commit 0f7363e)
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
When creating a plugin
my-plugin
, the tests in themy-plugin-e2e
project are generated inmy-plugin-e2e/tests/my-plugin.spec.ts
.However, the file
tsconfig.spec.json
does not include the files in thetests
directory but thesrc
directory, as seen below:The issue with this is that you can't import code from other libraries in the
-e2e
project, for example ane2e-util
lib.This patch changes where these specs are generated and updates the unit test that verifies the location.
From looking at the
nrwl/nx
repo itself, it looks like this is the structure that's being used, the actual specs live in thesrc/
directory.Expected Behavior
The code should live in a place where it's included so you can import from other libraries.
Related Issue(s)
Fixes #