-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Saner test setup #27
Saner test setup #27
Conversation
See also #20 (comment)
|
93bd5d8
to
448174e
Compare
- Upgrade lerna to the currently latest beta version (2.0.0-beta.35) - Get rid of global expect/sinon - Create a new package "@loopback/testlab" for shared test helpers - Configure top-level "npm test"
448174e
to
0332f66
Compare
This pull request also fixes TypeScript config and type definitions for As a result, the following code is highlighted in VS Code: I think we will need to contribute typings for dirty-chai if we decide to continue using TypeScript. |
LGTM |
LGTM, except one minor comment. |
{ | ||
"extends": "../tsconfig.json", | ||
"baseUrl": "." | ||
} |
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.
Is this file required?
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 removed it in a subsequent PR as everything works without this file anyways -- #30
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.
At some point, TS was not detecting @types
installed in test-lab's node_modules. If everything works for you without this file, then I am fine with removing it.
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.
Seems to be working for me (I'm getting autocompletion for both sinon/chai with it removed). Will add back later if we run into issues.
I'm thinking we should remove dirty-chai until:
I'm also up for creating an issue and maybe getting someone in community to look into it and label it beginner friendly. Not liking the red underline on ALL expects in vscode, it's distracting and bad UX ATM. |
👎 https://github.com/moll/js-must#beware-of-libraries-that-assert-on-property-access This is a real concern, we had real tests in loopback (juggler IIRC) that were calling undefined properties like
Agreed. I'll take a look at typings ASAP. |
I agree with why we added |
@loopback/testlab
for shared test helpers@superkhau @ritch please review