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
Expectation: We should know that our locale files (./locales/*.json) are valid in order to prevent issues like #1127. This should be verified by a computer (CircleCI) on every release (or every commit?), not just done manually.
Actual: We do not test locale data.
Motivation: axe-core throws when given "bad" locale data.
An example test may look like:
constfs=require('fs')constpath=require('path')constassert=require('assert')constglob=require('glob')constlocaleFiles=glob.sync('./locales/*.json')describe('locales',()=>{for(constlocaleFileoflocaleFiles){describe(`locale ${localeFile}`,()=>{it('should be valid',()=>{constlocaleData=fs.readFileSync(path.join(__dirname,localeFile),'utf-8')constlocale=JSON.parse(localeData)assert.doesNotThrow(()=>axe.configure({ locale }))})})}})
The text was updated successfully, but these errors were encountered:
Expectation: We should know that our locale files (
./locales/*.json
) are valid in order to prevent issues like #1127. This should be verified by a computer (CircleCI) on every release (or every commit?), not just done manually.Actual: We do not test locale data.
Motivation: axe-core throws when given "bad" locale data.
An example test may look like:
The text was updated successfully, but these errors were encountered: