Can't pass a config object to the backstop command with Docker
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
I have a Backstop project set up where the config is exported as a function which takes an options parameter ([as described in the README](https://github.com/garris/BackstopJS#parse-a-config-file-explicitly)).
```js
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?
Contributor guide
Research direction
Start with the README section on explicitly parsed config files and the Docker delegation shown in the issue. Reproduce the command with a config function returning an object, then determine whether Docker should receive a usable config or whether the limitation needs documentation; verify the resulting behavior with the reported command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100