Skip to content

Commit

Permalink
add tests for hasNoAria and lacksAria
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescdavis committed Mar 3, 2022
1 parent 88f39e5 commit 9fb288f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/__tests__/has-aria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ describe('assert.dom(...).hasAria()', () => {
test('smoke test', () => {
assert.dom('button').hasAria('pressed', 'true');
assert.dom('button').doesNotHaveAria('hidden');
assert.dom('button').hasNoAria('hidden');
assert.dom('button').lacksAria('hidden');

expect(assert.results).toEqual([
{
Expand All @@ -29,6 +31,18 @@ describe('assert.dom(...).hasAria()', () => {
message: 'Element button does not have attribute "aria-hidden"',
result: true,
},
{
actual: 'Element button does not have attribute "aria-hidden"',
expected: 'Element button does not have attribute "aria-hidden"',
message: 'Element button does not have attribute "aria-hidden"',
result: true,
},
{
actual: 'Element button does not have attribute "aria-hidden"',
expected: 'Element button does not have attribute "aria-hidden"',
message: 'Element button does not have attribute "aria-hidden"',
result: true,
},
]);
});
});

0 comments on commit 9fb288f

Please sign in to comment.