MCPcopy
hub / github.com/TomWright/dasel / run

Method run

api_test.go:18–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func (tc modifyTestCase) run(t *testing.T) {
19 count, err := dasel.Modify(t.Context(), &tc.in, tc.selector, tc.value)
20 if err != nil {
21 t.Fatalf("unexpected error: %v", err)
22 }
23 if count != tc.count {
24 t.Errorf("unexpected count: %d", count)
25 }
26 if !cmp.Equal(tc.exp, tc.in) {
27 t.Errorf("unexpected result: %s", cmp.Diff(tc.exp, tc.in))
28 }
29}
30
31func TestQuery(t *testing.T) {
32 t.Run("basic query", func(t *testing.T) {

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.45

Tested by

no test coverage detected