Skip to content

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

Description

@shobhitchittora

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.

Activity

  1. BridgeAR commented on Nov 14, 2019

    @BridgeAR
    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().

  2. BridgeAR commented on Nov 14, 2019

    @BridgeAR
    Member

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

  3. shobhitchittora commented on Nov 14, 2019

    @shobhitchittora
    ContributorAuthor

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

  4. juanarbol commented on Mar 27, 2020

    @juanarbol
    Member

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

  5. shobhitchittora commented on Apr 5, 2020

    @shobhitchittora
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions