Skip to content

Commit

Permalink
Use assets function in test cases
Browse files Browse the repository at this point in the history
Use `assets` function in test cases.
  • Loading branch information
HeavyWombat committed Oct 14, 2023
1 parent 61cba04 commit 581505c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/dyff/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ resource_pools:

Context("Given two files", func() {
It("should return differences in raw texts", func() {
from := file("../../assets/raw-text/from.txt")
to := file("../../assets/raw-text/to.txt")
from := file(assets("raw-text/from.txt"))
to := file(assets("raw-text/to.txt"))
Expect(from.Documents).To(HaveLen(1))
Expect(to.Documents).To(HaveLen(1))

Expand Down Expand Up @@ -664,8 +664,8 @@ listY: [ Yo, Yo, Yo ]

It("should return differences in named lists even if no standard identifier is used", func() {
results, err := dyff.CompareInputFiles(
file("../../assets/prometheus/from.yml"),
file("../../assets/prometheus/to.yml"),
file(assets("prometheus/from.yml")),
file(assets("prometheus/to.yml")),
)

Expect(err).To(BeNil())
Expand Down Expand Up @@ -713,8 +713,8 @@ listY: [ Yo, Yo, Yo ]

It("should fail to find the non-standard identifier if the threshold is too high", func() {
report, err := dyff.CompareInputFiles(
file("../../assets/prometheus/from.yml"),
file("../../assets/prometheus/to.yml"),
file(assets("prometheus/from.yml")),
file(assets("prometheus/to.yml")),
dyff.NonStandardIdentifierGuessCountThreshold(8),
)

Expand Down

0 comments on commit 581505c

Please sign in to comment.