aria-api

access ARIA information from JavaScript
git clone https://git.ce9e.org/aria-api.git

commit
de7035e0217f982263e4df6d8f43aedc98d55fd0
parent
87d93f68cf5f7e7e6bcc4282218afd7971d50b1e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-06-21 18:31
wpt: work around generic tests

Diffstat

M test/test-wpt.js 13 ++++++++++++-

1 files changed, 12 insertions, 1 deletions


diff --git a/test/test-wpt.js b/test/test-wpt.js

@@ -1,5 +1,12 @@
    1     1 /* global describe, it, xit, before, after, expect, aria */
    2     2 
   -1     3 expect.extend({
   -1     4 	toBeIn(list) {
   -1     5 		expect.assert(list.includes(this.actual), 'expected %s to be in %s', this.actual, list);
   -1     6 		return this;
   -1     7 	},
   -1     8 });
   -1     9 
    3    10 describe('wpt', () => {
    4    11 	var testbed = document.createElement('div');
    5    12 	var known_failing = [
@@ -84,7 +91,11 @@ describe('wpt', () => {
   84    91 				expect(aria.getDescription(element)).toBe(test.description);
   85    92 			}
   86    93 			if (test.role != null) {
   87    -1 				expect(aria.getRole(element)).toBe(test.role);
   -1    94 				if (test.role === 'generic') {
   -1    95 					expect(aria.getRole(element)).toBeIn(['generic', 'none', undefined]);
   -1    96 				} else {
   -1    97 					expect(aria.getRole(element)).toBe(test.role);
   -1    98 				}
   88    99 			}
   89   100 		});
   90   101 	};