Skip to content

Commit ba74f11

Browse files
committed
infra(tests): fix linting for spec
1 parent 1ff3554 commit ba74f11

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

test/quicklink.spec.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('quicklink tests', function () {
9090
await page.waitFor(1000);
9191

9292
expect(responseURLs).to.be.an('array');
93-
//=> origins: ['github.githubassets.com']
93+
// => origins: ['github.githubassets.com']
9494
expect(responseURLs).to.not.include(`${server}/2.html`);
9595
expect(responseURLs).to.include('https://example.com/1.html');
9696
expect(responseURLs).to.include('https://github.githubassets.com/images/spinners/octocat-spinner-32.gif');
@@ -106,7 +106,7 @@ describe('quicklink tests', function () {
106106
await page.waitFor(1000);
107107

108108
expect(responseURLs).to.be.an('array');
109-
//=> origins: true
109+
// => origins: true
110110
expect(responseURLs).to.include(`${server}/2.html`);
111111
expect(responseURLs).to.include('https://foobar.com/3.html');
112112
expect(responseURLs).to.include('https://example.com/1.html');
@@ -122,7 +122,7 @@ describe('quicklink tests', function () {
122122

123123
await page.waitFor(1000);
124124
expect(responseURLs).to.be.an('array');
125-
//=> origins: [location.hostname] (default)
125+
// => origins: [location.hostname] (default)
126126
expect(responseURLs).to.include(`${server}/2.html`);
127127
expect(responseURLs).to.not.include('https://example.com/1.html');
128128
expect(responseURLs).to.not.include('https://github.githubassets.com/images/spinners/octocat-spinner-32.gif');
@@ -137,11 +137,14 @@ describe('quicklink tests', function () {
137137

138138
await page.waitFor(1000);
139139
expect(responseURLs).to.be.an('array');
140-
//=> origins: [location.hostname] (default)
141-
//=> ignores: /2.html/
142-
expect(responseURLs).to.not.include(`${server}/2.html`); // via ignores
143-
expect(responseURLs).to.not.include('https://example.com/1.html'); // via same origin
144-
expect(responseURLs).to.not.include('https://github.githubassets.com/images/spinners/octocat-spinner-32.gif'); // via same origin
140+
// => origins: [location.hostname] (default)
141+
// => ignores: /2.html/
142+
// via ignores
143+
expect(responseURLs).to.not.include(`${server}/2.html`);
144+
// via same origin
145+
expect(responseURLs).to.not.include('https://example.com/1.html');
146+
// via same origin
147+
expect(responseURLs).to.not.include('https://github.githubassets.com/images/spinners/octocat-spinner-32.gif');
145148
});
146149

147150
it('should only prefetch links after ignore patterns allowed it (multiple)', async function () {
@@ -153,11 +156,14 @@ describe('quicklink tests', function () {
153156

154157
await page.waitFor(1000);
155158
expect(responseURLs).to.be.an('array');
156-
//=> origins: true (all)
157-
//=> ignores: [...]
159+
// => origins: true (all)
160+
// => ignores: [...]
158161
expect(responseURLs).to.include(`${server}/2.html`);
159-
expect(responseURLs).to.not.include('https://example.com/1.html'); // /example/
160-
expect(responseURLs).to.not.include('https://foobar.com/3.html'); // (uri) => uri.includes('foobar')
161-
expect(responseURLs).to.not.include('https://github.githubassets.com/images/spinners/octocat-spinner-32.gif'); // (uri, elem) => elem.textContent.includes('Spinner')
162+
// /example/
163+
expect(responseURLs).to.not.include('https://example.com/1.html');
164+
// (uri) => uri.includes('foobar')
165+
expect(responseURLs).to.not.include('https://foobar.com/3.html');
166+
// (uri, elem) => elem.textContent.includes('Spinner')
167+
expect(responseURLs).to.not.include('https://github.githubassets.com/images/spinners/octocat-spinner-32.gif');
162168
});
163169
});

0 commit comments

Comments
 (0)