Skip to content

Commit

Permalink
Moved a couple tests to es5 packages to test IE support.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewplummer committed Jul 27, 2018
1 parent 68cd5f2 commit f351548
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/browser/default/dev/dist.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="text/javascript" src="../../../suite/resets/es6.js"></script>
<script type="text/javascript" src="../../../suite/resets/es7.js"></script>
<!-- Sugar NPM package -->
<script type="text/javascript" src="../../../../dist/sugar.js"></script>
<script type="text/javascript" src="../../../../dist/sugar-es5.js"></script>
<!-- Locales -->
<script type="text/javascript" src="../../../../dist/locales/ca.js"></script>
<script type="text/javascript" src="../../../../dist/locales/da.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion test/browser/default/min/dist.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="text/javascript" src="../../../suite/resets/es6.js"></script>
<script type="text/javascript" src="../../../suite/resets/es7.js"></script>
<!-- Sugar -->
<script type="text/javascript" src="../../../../dist/sugar.min.js"></script>
<script type="text/javascript" src="../../../../dist/sugar-es5.min.js"></script>
<!-- Locales -->
<script type="text/javascript" src="../../../../dist/locales/ca.js"></script>
<script type="text/javascript" src="../../../../dist/locales/da.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion test/browser/extended/min/sugar.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="text/javascript" src="../../../suite/resets/es6.js"></script>
<script type="text/javascript" src="../../../suite/resets/es7.js"></script>
<!-- Sugar NPM dist package -->
<script type="text/javascript" src="../../../../packages/sugar/dist/sugar-es5.min.js"></script>
<script type="text/javascript" src="../../../../packages/sugar/dist/sugar-es5.js"></script>
<script type="text/javascript" src="../../../../packages/sugar/dist/locales/ca.js"></script>
<script type="text/javascript" src="../../../../packages/sugar/dist/locales/da.js"></script>
<script type="text/javascript" src="../../../../packages/sugar/dist/locales/de.js"></script>
Expand Down
8 changes: 6 additions & 2 deletions test/browser/javascripts/suite-ui.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
(function($) {

function hasOwnProperty(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}

function arrayEach(arr, fn) {
for(var i = 0; i < arr.length; i++) {
fn(arr[i], i, arr);
Expand Down Expand Up @@ -59,7 +63,7 @@
return '<p class="warning">Warning: ' + message + '</p>';
} else {
var html = '<p class="fail">' + message;
if (f.hasOwnProperty('expected') && f.hasOwnProperty('actual')) {
if (hasOwnProperty(f, 'expected') && hasOwnProperty(f, 'actual')) {
expected = getStringified(f.expected);
actual = getStringified(f.actual);
html += ' | expected: ' + escapeHTML(expected) + ' actual: ' + escapeHTML(actual);
Expand All @@ -84,7 +88,7 @@

stringify:
for(var key in p){
if(!p.hasOwnProperty(key)) continue;
if(!hasOwnProperty(p, key)) continue;
if(p[key] === undefined) {
arr.push(key + ': undefined');
} else {
Expand Down

0 comments on commit f351548

Please sign in to comment.