Assert the page is (or is not) served by a production build. A production build loads its code from /assets/js/ with a content hash in each name (main.53b8df17.js); the development server (start) loads /main.js with no hash, keeps a hot-reload connection open and sets a webpackHotUpdate… global.
Examples
Then the site should be served as a production build
And the site should be a production build
But the site should not be served as a production build
Then site should be a production build
And the site should be served as a production build
Pattern
Then(/^(?:the )?site should( not)* be (?:served as )?a production build$/, …)
Part of @webship-js/docusaurus-steps (github.com/webship/docusaurus-steps), a step pack for Webship-js 2.0.x.