You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Updated the `cW` function to avoid truncating the calculated width, this matches the default behaviour in magnaCharta which does not restrict the number of decimal places
- Use the [toBeCloseTo](https://jasmine.github.io/api/5.6/matchers#toBeCloseTo) matcher and set the number of decimal points to check to 4
Fixes: #2229
- Updated the `cW` function to avoid truncating the calculated width, this matches the default behaviour in magnaCharta which does not restrict the number of decimal places
- Use the [toBeCloseTo](https://jasmine.github.io/api/5.6/matchers#toBeCloseTo) matcher and set the number of decimal points to check to 4
Fixes: #2229
It looks as if Safari rounds differently to other browsers, which causes a test for Magna Charta to fail.
Failing test:
govuk_publishing_components/spec/javascripts/govuk_publishing_components/lib/govspeak/magna-charta-spec.js
Lines 269 to 277 in 8a45baa
The test fails with the error for line 272:
and for line 275:
which makes me think that the
cW
helper function is the culprit:govuk_publishing_components/spec/javascripts/govuk_publishing_components/lib/govspeak/magna-charta-spec.js
Lines 15 to 25 in 8a45baa
The text was updated successfully, but these errors were encountered: