Can't pass a config object to the backstop command with Docker
See original GitHub issueI have a Backstop project set up where the config is exported as a function which takes an options parameter (as described in the README).
const backstop = require('backstopjs');
(async () => {
await backstop('test', {
docker: true,
config: require('./backstop.config.js')(),
})
})();
I decided to start running tests with Docker, but when I did, running the tests failed.
Delegating command to Docker... docker run --rm -it --mount type=bind,source="/Users/josef/Code/backstopSanityTest",target=/src backstopjs/backstopjs:3.8.8 test "--moby=true" "--config=[object Object]" ""
--config=[object Object]
is of course not a valid configuration.
Is this an issue with the code or with the documentation?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top Results From Across the Web
backstopjs - npm
Pass a --config=<configFilePathStr> argument to test using a different config file. JS based config file. You may use a javascript based config ......
Read more >iain17/backstopjs - Docker Image | Docker Hub
Just be sure to export your config object as a node module. Pass a --filter=<scenarioLabelRegex> argument to just run scenarios matching your scenario...
Read more >Developing inside a Container - Visual Studio Code
The command lets you pick a pre-defined container configuration from a list based on your folder's contents, reuse an existing Dockerfile, or reuse...
Read more >Overview of BackstopJS, a tool to test a web application's UI
First run backstop init to setup your project. ... a config file by using the node invocation e.g. Pass a config object to...
Read more >Front-end automated testing using BackstopJS and KSS style ...
style.css --homepage homepage.md", "backstop-reference": "npm run styleguide && backstop reference --config=backstop.js --docker", ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds good to me. Maybe create a temp file with common prefix and unique suffix name in parallel with working config file. Something like that?
Yes, would it be acceptable to generate a temporary config file and delete it once the test is complete?