Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #476 from snewcomer/assert-textContent
Browse files Browse the repository at this point in the history
use textContent instead of innerHTML
  • Loading branch information
James Alexander Rosen committed Feb 8, 2018
2 parents ec1b9b4 + 616f846 commit 2d8f256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon-test-support/-private/assert-translation.js
Expand Up @@ -3,7 +3,7 @@
export default (function() {
if (typeof QUnit !== 'undefined' && typeof QUnit.assert.ok === 'function') {
return function(element, key, text) {
QUnit.assert.ok(document.querySelector(element).innerHTML.indexOf(text) !== -1, `Found translation key ${key} in ${element}`);
QUnit.assert.ok(document.querySelector(element).textContent.indexOf(text) !== -1, `Found translation key ${key} in ${element}`);
};
} else if (typeof expect === 'function') {
return function(element, key, text) {
Expand Down

0 comments on commit 2d8f256

Please sign in to comment.