![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@cypress/webpack-dev-server
Advanced tools
Readme
Note this package is not meant to be used outside of cypress component testing.
Install @cypress/vue
or @cypress/react
to get this package working properly
To install @cypress/webpack-dev-server
in you component testing environment,
yarn add @cypress/webpack-dev-server
cypress/plugins/index.js
import { startDevServer } from '@cypress/webpack-dev-server'
module.exports = (on, config) => {
on('dev-server:start', async (options) => startDevServer({ options }))
return config
}
__cypress/iframes/
src/components/button.spec.tsx
__cypress/iframes/...
will be passed to the dev-server as __cypress/src/index.html
__cypress/src/
will be passed to the dev-server to deal as is, without changes.__cypress/src/
(base path should be this prefix).__cypress/src/index.html
with an html page.
This page
<div id="__cy_root"></div>
to attach the mounted components to.devServerEvents.emit('dev-server:compile:success')
Webpack-dev-server fulfills his responsibilities by
webpack.config
from the users setup by changing the entrypoint to browser.ts
devServer.publicPath = "__cypress/src/"
and devServer.hot = false
browser.ts
) delegates the loading of spec files to the loader.
AUT-Runner.ts
to load and launch the support file and the current specstartDevServer
takes an object of options.
options
(required): this contains various internal configuration. It's provided as the first argument to the dev-server:start
event. Just make sure you pass it to the startDevServer
.webpackConfig
(optional): the webpack config used by your application. We provide some presets, but you can pass the webpackConfig
manually, too.template
(optional): by default this index.html is used. You can provide your own using this option. This is useful if you'd like to include some CDN links, or in some way customize the default html. If you are passing this option, ensure your index.html
contains the same content as the default template. Some of our presets include a custom index.html
, such as Next.See npm/react/plugins/next for a full example using all the options.
In order to get webpack performance statistics run yarn cypress open-ct
or yarn cypress run-ct
with WEBPACK_PERF_MEASURE
env variable:
WEBPACK_PERF_MEASURE=true yarn cypress run-ct
This will output the timings of whole webpack output and timings for each specified plugin and loader.
In order to run performance tests and compare timings with the previous build run:
WEBPACK_PERF_MEASURE=true WEBPACK_PERF_MEASURE_COMPARE={name-of-project} yarn cypress run-ct
This will create the file ./__perf-stats/{name-of-project}.json
or if this file exists will compare results with the previously saved version.
In order to update the {name-of-project}.json
file and use new stats as a base for the next comparisons run:
WEBPACK_PERF_MEASURE=true WEBPACK_PERF_MEASURE_UPDATE=true WEBPACK_PERF_MEASURE_COMPARE={name-of-project} yarn cypress run-ct
FAQs
Launches Webpack Dev Server for Component Testing
The npm package @cypress/webpack-dev-server receives a total of 150,834 weekly downloads. As such, @cypress/webpack-dev-server popularity was classified as popular.
We found that @cypress/webpack-dev-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.