google / google/zx

How do I write tests for zx scripts?

Open
#1,297 3 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
45.7k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I have a bunch of zx automation scripts that become complex enough that I want to unit test them.
Is there any best practice on how to do this? I guess I could refactor the code so that most of the logic lives in normal JS files, and test those, but is there an easier way?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.