blackstork-io / fabric

An open-source command-line tool for reporting workflow automation and a configuration language for reusable templates. Reporting-as-Code
https://blackstork.io/fabric/
Apache License 2.0
12 stars 0 forks source link

Test helpers refactoring #180

Closed Andrew-Morozko closed 3 weeks ago

Andrew-Morozko commented 3 weeks ago

Make it more inline with go convention tnx dobarx

Also found a way to combine ExtendHcl and Extend methods on my diagnostics wrapper)

Andrew-Morozko commented 3 weeks ago

@traut If you'd like to add anything to the asserts in this PR – feel free to. Otherwise you can merge it and rebase your #178 on top of this

I've ported the exact matching that you've implemented and now use similar condenced diagnostic output format (if filemap is not present. If we have filemap - hcl's diagnostic printer highlignts the code ranges, so I've kept it as is).

Also now matchBiject returnes only unmatched asserts and diagnostics, hopefully making it easier to debug)