Skip to content

Allow multiple audit categories to be run in a single assertion #29

@joshmcarthur

Description

@joshmcarthur

Running categories one per example is suboptimal, because it requires a full browser start up and Lighthouse run, just to pluck a different key from the result JSON.

It should be pretty simple for this library to accept a list of categories to run instead of a single one (since the 'score' args etc are kwargs, we can just accept multiple categories before grabbing the kwargs).

The invocation would look like it {expect("https://example.com").to pass_lighthouse_audit(:accessibility, :pwa, score: 85).

We might also want to consider an alternative syntax, with a hash of audit category name => expected score

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