DefinitelyTyped/types/pa11y/pa11y-tests.ts
Adam Zerella 83e40f8eb3
Add typing for pa11y (#43060)
Co-authored-by: Adam Zerella <adamzerella@users.noreply.github.com>
2020-03-27 13:13:46 -04:00

30 lines
618 B
TypeScript

import pa11y = require('pa11y');
pa11y('http://example.com/');
pa11y('http://example.com/', {
log: {
debug: console.log,
error: console.error,
info: console.info
}
});
pa11y('http://example.com/', {
actions: [
'set field #username to exampleUser',
'wait for url to be http://example.com/myaccount'
],
log: {
debug: console.log,
},
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
method: 'POST',
postData: 'foo=bar&bar=baz',
rootElement: '#main'
});
pa11y.isValidAction('open the pod bay doors');