Skip to content
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: tests using lib prohibited #2625

Merged
merged 1 commit into from
Nov 19, 2020
Merged

Conversation

nbbeeken
Copy link
Contributor

One of our tests was using lib which stops the tests from running if you have a clean repo, this little fix changes the import and adds a linter rule to catch this for us going forward.

@@ -29,6 +29,9 @@
"jsdoc/require-returns-type": "off",
"jsdoc/valid-types": "off",

// Since we use ts-node we should always require the TS code
"no-restricted-modules": ["error", { "patterns": ["**/../lib/**"] }],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern is ../lib otherwise it matched a mocha/lib and bson/lib import we use

@nbbeeken nbbeeken force-pushed the chore/test-import-from-lib-fix branch from 9aca28c to dda57ab Compare November 19, 2020 16:06
@nbbeeken nbbeeken merged commit 5e04fff into master Nov 19, 2020
@nbbeeken nbbeeken deleted the chore/test-import-from-lib-fix branch November 19, 2020 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants