move gt
handlebars helper to accessibility formatter
#929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#926 started causing an error in the html formatters test when the accessibility formatter tried to use the
gt
handlebars helper but no such helper existed (in #926 that helper was put inreport-generator.js
, which doesn't run in this test). This PR moves that helper into the accessibility formatter class, which is the only place it's currently used anyways.There are other formatters that use helpers defined in
report-generator.js
; the key difference is that the accessibility formatter calls on that helper even when run on empty input (as the test does), while the other formatters do not.Interestingly Travis does not report this error in the tests. I suspect it has something to do with the global nature of the Handlebars helper registration (so perhaps other tests have already registered the
report-generator.js
helpers) but I haven't been able to track that down.