counterfact icon indicating copy to clipboard operation
counterfact copied to clipboard

Start Counterfact from Code

Open dethell opened this issue 1 year ago • 1 comments

The use case here is a Playwright test run (or some other E2E test setup) that needs to spin up Counterfact in order to run some tests.

Currently we handle this by having an npm script as the Playwright server script that starts both CF and the app engine (webpack dev server in our case). This is brittle and sometimes one or the other process doesn't start correctly. While that's likely something we could fix within the npm script setup, I see a case for being able to spin up Counterfact from within a test suite.

dethell avatar Jan 18 '24 16:01 dethell

Absolutely. And expose the context objects so the tests can put the server into the state needed for testing.

Edit: I just saw #730. 💯

pmcelhaney avatar Jan 18 '24 22:01 pmcelhaney