Skip to content

Commit 563e9da

Browse files
committed
Fix: Fixed test issue when it tried to call a not yet existing constructor in legacy browsers.
1 parent 294ae4b commit 563e9da

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

test/request-test.html

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,11 @@
1717
<script src="../../web-component-tester/browser.js"></script>
1818
<script src="../../iron-test-helpers/test-helpers.js"></script>
1919
<script src="../../iron-test-helpers/mock-interactions.js"></script>
20-
<link rel="import" href="../../raml-js-parser/raml-js-parser.html">
21-
<link rel="import" href="../../raml-json-enhance/raml-json-enhance.html">
20+
<link rel="import" href="../../fetch-polyfill/fetch-polyfill.html">
2221
<link rel="import" href="../api-console-request.html">
2322
</head>
2423

2524
<body>
26-
<test-fixture id="parser">
27-
<template>
28-
<raml-js-parser json></raml-js-parser>
29-
</template>
30-
</test-fixture>
31-
<test-fixture id="enhancer">
32-
<template>
33-
<raml-json-enhance></raml-json-enhance>
34-
</template>
35-
</test-fixture>
3625
<test-fixture id="basic">
3726
<template>
3827
<api-console-request></api-console-request>
@@ -55,7 +44,7 @@
5544
</test-fixture>
5645
<script>
5746
/* global fixture, assert, TestHelpers */
58-
suite('basic', function() {
47+
suite('basic api-console-request', function() {
5948
var element;
6049

6150
setup(function() {
@@ -77,16 +66,16 @@
7766

7867
suite('Response handling', function() {
7968
var element;
80-
var response = new Response('test', {
81-
statusCode: 200,
82-
headers: {
83-
'content-type': 'x-test'
84-
}
85-
});
69+
var response;
8670

8771
setup(function() {
8872
element = fixture('basic');
89-
element.response = response;
73+
element.response = new Response('test', {
74+
statusCode: 200,
75+
headers: {
76+
'content-type': 'x-test'
77+
}
78+
});
9079
TestHelpers.forceXIfStamp(element);
9180
});
9281

@@ -179,7 +168,8 @@
179168
test('Encodes URL for proxy', function() {
180169
element.proxyEncodeUrl = true;
181170
element._appendProxy(event);
182-
assert.equal(event.detail.url, 'https://domain.com/http%3A%2F%2Ftest.domain.com%2F%3Fparam%3Dvalue');
171+
assert.equal(event.detail.url,
172+
'https://domain.com/http%3A%2F%2Ftest.domain.com%2F%3Fparam%3Dvalue');
183173
});
184174
});
185175

0 commit comments

Comments
 (0)