Skip to content

Commit

Permalink
fix(toHaveSubset): typo in negatedReason
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardtke committed Jun 9, 2023
1 parent 6a8931d commit 3e09150
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/earl/src/validators/objects/toHaveSubset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe(toHaveSubset.name, () => {
expect(() => {
earl({ prop: true }).not.toHaveSubset({ prop: true })
}).to.throw(
'The value { prop: true } does has a subset of { prop: true }, but it was expected not to.',
'The value { prop: true } does have a subset of { prop: true }, but it was expected not to.',
)
})

Expand All @@ -92,7 +92,7 @@ describe(toHaveSubset.name, () => {
prop2: 'string',
})
}).to.throw(
'The value { prop: true, prop2: "string" } does has a subset of { prop: true, prop2: "string" }, but it was expected not to.',
'The value { prop: true, prop2: "string" } does have a subset of { prop: true, prop2: "string" }, but it was expected not to.',
)
})

Expand All @@ -107,7 +107,7 @@ describe(toHaveSubset.name, () => {
prop3: earl.a(Array),
})
}).to.throw(
'The value { prop: true, prop2: "string", prop3: [] } does has a subset of { prop2: expect.a(String), prop3: expect.a(Array) }, but it was expected not to.',
'The value { prop: true, prop2: "string", prop3: [] } does have a subset of { prop2: expect.a(String), prop3: expect.a(Array) }, but it was expected not to.',
)
})

Expand Down
2 changes: 1 addition & 1 deletion packages/earl/src/validators/objects/toHaveSubset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ export function toHaveSubset(control: Control, expected: Subset): void {
control.assert({
success: subset(expected)(control.actual),
reason: `The value ${actualInline} does not have a subset of ${expectedInline}, but it was expected to.`,
negatedReason: `The value ${actualInline} does has a subset of ${expectedInline}, but it was expected not to.`,
negatedReason: `The value ${actualInline} does have a subset of ${expectedInline}, but it was expected not to.`,
})
}

0 comments on commit 3e09150

Please sign in to comment.