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

assert: confusion between JS strict mode and assert strict mode #30485

Closed
shobhitchittora opened this issue Nov 14, 2019 · 5 comments
Closed

Comments

@shobhitchittora
Copy link
Contributor

Hi maintainers,
I was just going through the docs of the assert module and was confused with the whole idea of strict mode there. It'd great if someone can give a brief idea behind the way it is implemented now and the reasoning behind it.

PS: I literally tried adding "use strict"; hoping it'd be picked up.

@BridgeAR
Copy link
Member

The assert strict mode is completely independent from the JavaScript strict mode ("use strict").

Using assert's strict mode means e.g. assert.equal() to behave identical to assert.strictEqual().

@BridgeAR
Copy link
Member

If you have a recommendation to improve the documentation, please open a PR for that :)

@shobhitchittora
Copy link
Contributor Author

@BridgeAR added some content to point the differences out. Please take a look if the change is okay.

addaleax pushed a commit that referenced this issue Dec 3, 2019
Refs: #30485

PR-URL: #30486
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
targos pushed a commit that referenced this issue Dec 9, 2019
Refs: #30485

PR-URL: #30486
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
targos pushed a commit that referenced this issue Jan 13, 2020
Refs: #30485

PR-URL: #30486
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
BethGriggs pushed a commit that referenced this issue Feb 6, 2020
Refs: #30485

PR-URL: #30486
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@juanarbol
Copy link
Member

Ping @BridgeAR I think this issue can be closed now.

@shobhitchittora
Copy link
Contributor Author

Yes @juanarbol! This can be closed now.
Fixed here -> #30486

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

No branches or pull requests

3 participants