question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't pass a config object to the backstop command with Docker

See original GitHub issue

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).

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:open
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
garriscommented, Feb 15, 2019

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?

0reactions
engelfrostcommented, Feb 15, 2019

Yes, would it be acceptable to generate a temporary config file and delete it once the test is complete?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found