(ctx context.Context, file string)
| 791 | } |
| 792 | |
| 793 | func matchFileSnapshot(ctx context.Context, file string) error { |
| 794 | status, err := ecStatusFrom(ctx) |
| 795 | if err != nil { |
| 796 | return err |
| 797 | } |
| 798 | |
| 799 | expanded := os.Expand(file, func(key string) string { |
| 800 | return status.vars[key] |
| 801 | }) |
| 802 | |
| 803 | content, err := os.ReadFile(expanded) |
| 804 | if err != nil { |
| 805 | return err |
| 806 | } |
| 807 | |
| 808 | return snaps.MatchSnapshot(ctx, file, string(content), status.vars) |
| 809 | } |
| 810 | |
| 811 | func createGenericFile(ctx context.Context, name string, content *godog.DocString) (context.Context, error) { |
| 812 | ctx, _, vars, err := variables(ctx) |
nothing calls this directly
no test coverage detected