gomega-matchers

module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0

README

gomega-matchers

Additional matchers for gomega

JQ support


in := `
{ 
  "status":{ 
    "foo": { 
      "bar": "fr", 
      "baz": "fz" 
    } 
  } 
}
`

Expect(in).Should(
    WithTransform(jq.Extract(`.status`),
        And(
            jq.Match(`.foo.bar == "fr"`),
            jq.Match(`.foo.baz == "fz"`),
        ),
    )),
)

YQ support


in := `
status:
  foo:
    bar: fr
    baz: fz
`

Expect(in).Should(
    WithTransform(yq.Extract(`.status`),
        And(
            yq.Match(`.foo.bar == "fr"`),
            yq.Match(`.foo.baz == "fz"`),
        ),
    )),
)

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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