test_with_stripe_mock

command
v76.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

A script that wraps the run of the project test suite and starts stripe-mock with a custom OpenAPI + fixtures bundle if one was found in the appropriate spot (see `pathSpec` below).

The script passes all its arguments to a Go's test command, and defaults to `./...`. For example, both of the following are valid invocations:

go run test_with_stripe_mock/main.go
go run test_with_stripe_mock/main.go ./charge

The reason that we need a separate script for this is because Go's testing infrastructure doesn't provide any kind of global hook that we can use to do this work in only one place before any tests are run.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL