Assert the lines a code block highlights, by their numbers ("2, 4-5"): exactly those, from the lines given in its first line (``js {2,4-5}) or with // highlight-next-line` comments.
Examples
Then the code block "example.config.js" should highlight the lines "2, 4-5"
And the code block "server.js" should highlight the line "2"
Then code block "example.config.js" should highlight the lines "2, 4 and 5"
And the code block "server.ts" should highlight the line "2"
Then the code block "example.config.js" should highlight the lines "2,4,5"
Pattern
Then(/^(?:the )?code block "([^"]*)?" should highlight the lines? "([^"]*)?"$/, …)
Part of @webship-js/docusaurus-steps (github.com/webship/docusaurus-steps), a step pack for Webship-js 2.0.x.