Skip to content

bodyParser Test regex requires semicolon #1

@JacobGo

Description

@JacobGo

I was failing the bodyParser middleware test for a while until I realized the regex was expecting a semicolon at the end of the line. Semicolons are optional in JavaScript and I didn't have one, breaking the test. Removing the semicolon at the end of the regex seems like a reasonable fix.

const bodyParserRegex = /app.use\((\s+)?bodyParser.urlencoded\({(\s+)?extended: false(\s+)?}\)(\s+)?\);/;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions