Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import backstop, { Scenario, Viewport } from 'backstopjs';
/** Examples inspired on https://github.com/garris/BackstopJS#integration-options-local-install */
backstop('approve').then(() => { }).catch(() => { });
backstop('init');
backstop('reference', {
filter: 'someScenarioLabelAsRegExString'
});
backstop('test', { config: 'custom/backstop/config.json' });
backstop('test', {
filter: 'someScenarioLabelAsRegExString',
config: {
id: 'foo',
scenarios: [],
viewports: [],
dockerCommandTemplate:
'docker run --rm -it --net="host" --mount type=bind,source="{cwd}",target=/src backstopjs/backstopjs:{version} {backstopCommand} {args}',
},
});
/** Custom example */
const scenarios: Scenario[] = [
{
label: 'Microsoft',
url: 'https://microsoft.com/',
import backstop, { Scenario, Viewport } from 'backstopjs';
/** Examples inspired on https://github.com/garris/BackstopJS#integration-options-local-install */
backstop('approve').then(() => { }).catch(() => { });
backstop('init');
backstop('reference', {
filter: 'someScenarioLabelAsRegExString'
});
backstop('test', { config: 'custom/backstop/config.json' });
backstop('test', {
filter: 'someScenarioLabelAsRegExString',
config: {
id: 'foo',
scenarios: [],
viewports: [],
dockerCommandTemplate:
'docker run --rm -it --net="host" --mount type=bind,source="{cwd}",target=/src backstopjs/backstopjs:{version} {backstopCommand} {args}',
},
});
import backstop, { Scenario, Viewport } from 'backstopjs';
/** Examples inspired on https://github.com/garris/BackstopJS#integration-options-local-install */
backstop('approve').then(() => { }).catch(() => { });
backstop('init');
backstop('reference', {
filter: 'someScenarioLabelAsRegExString'
});
backstop('test', { config: 'custom/backstop/config.json' });
backstop('test', {
filter: 'someScenarioLabelAsRegExString',
config: {
id: 'foo',
scenarios: [],
viewports: [],
dockerCommandTemplate:
import backstop, { Scenario, Viewport } from 'backstopjs';
/** Examples inspired on https://github.com/garris/BackstopJS#integration-options-local-install */
backstop('approve').then(() => { }).catch(() => { });
backstop('init');
backstop('reference', {
filter: 'someScenarioLabelAsRegExString'
});
backstop('test', { config: 'custom/backstop/config.json' });
backstop('test', {
filter: 'someScenarioLabelAsRegExString',
config: {
id: 'foo',
scenarios: [],
viewports: [],
dockerCommandTemplate:
'docker run --rm -it --net="host" --mount type=bind,source="{cwd}",target=/src backstopjs/backstopjs:{version} {backstopCommand} {args}',
},