Skip to content

Commit f03e8d1

Browse files
valdrinkoshiTimvdLippe
authored andcommitted
test more permutations
1 parent 41616c6 commit f03e8d1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/runner.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -101,26 +101,26 @@
101101
// test shadowdom/custom elements polyfills together
102102
// preferring both if possible.
103103
var matrix = [''];
104-
var webcomponents = '';
105104
if (window.customElements) {
106-
webcomponents = 'wc-ce=true';
105+
matrix.push('wc-ce=true');
107106
}
108107
// if native is available, make sure to test polyfill
109108
if (Element.prototype.attachShadow && Node.prototype.getRootNode) {
110-
webcomponents = addUrlOption(webcomponents, 'wc-shadydom=true');
109+
matrix.push('wc-shadydom=true');
111110
}
112-
// ce + sd becomes a single test iteration.
113-
if (webcomponents) {
114-
matrix.push(webcomponents);
111+
// Both sd and ce are supported, force both polyfills
112+
if (matrix.length === 3) {
113+
// ce + sd becomes a single test iteration.
114+
matrix.push('wc-ce=true&wc-shadydom=true');
115115
}
116+
116117
// economize testing by testing css shimming
117118
// only against 1 environment (native or polyfill).
118119
if (window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)')) {
119-
var last = matrix[matrix.length-1];
120+
var last = matrix.length === 1 ? '' : matrix[matrix.length - 1];
120121
matrix.push(addUrlOption(last, 'wc-shimcssproperties=true'));
121122
}
122123
suites = combinations(suites, [matrix]);
123-
124124
console.log('Testing suites:\n\t' + suites.join('\n\t'));
125125

126126
WCT.loadSuites(suites);

0 commit comments

Comments
 (0)