Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Snapshot file required, deleting it fails the test, even when readFileMaybe is plugged in #122

@JasonKleban

Description

@JasonKleban

How is this working for anyone?

la(is.string(js), 'expected JavaScript snapshot source', js)

If the file isn't present then I get an error about the file missing. I use the recommended readFileMaybe() returns null which will always fail the is.string(js) assertion. Shouldn't that assertion above be the following?

    la(!js || is.string(js), 'expected JavaScript snapshot source', js)

Alternatively, I guess readFileMaybe() can return "null"; instead, so that it is a string content that will eval() to falsey, but that's not a good solution.

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