Skip to content

Commit

Permalink
Merge pull request #431 from youluna/master
Browse files Browse the repository at this point in the history
chore(*): make sure rendering done before a11y test
  • Loading branch information
youluna authored Mar 11, 2019
2 parents e08bbc6 + ecb2cde commit 0b93378
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/util/a11y/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ export const mountReact = async function(node, id = A11Y_ROOT_ID) {
*/
// TODO: resolve issue where failing tests do not pass wrapper and so cannot be cleaned up correctly
export const testReact = async function(node, options = {}) {
const wrapper = mountReact(node, A11Y_ROOT_ID);
await test(`#${A11Y_ROOT_ID}`, options);
const wrapper = await mountReact(node, A11Y_ROOT_ID);
setTimeout(async () => {
await test(`#${A11Y_ROOT_ID}`, options);
}, 100);
return wrapper;
};

Expand Down

0 comments on commit 0b93378

Please sign in to comment.