Skip to content
This repository was archived by the owner on Feb 25, 2022. It is now read-only.

Commit 8f891f0

Browse files
renovate[bot]renovate-botadobe-botdominique-pfister
authored
chore(deps): update dependency @adobe/eslint-config-helix to v1.3.1 (#443)
* chore(deps): update dependency @adobe/eslint-config-helix to v1.3.1 * chore(ci): trigger ci [skip action] * chore: fix lint Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: adobe-bot <[email protected]> Co-authored-by: Dominique Pfister <[email protected]>
1 parent 95dc6cf commit 8f891f0

File tree

4 files changed

+150
-115
lines changed

4 files changed

+150
-115
lines changed

package-lock.json

Lines changed: 59 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"rss-parser": "3.12.0"
4545
},
4646
"devDependencies": {
47-
"@adobe/eslint-config-helix": "1.3.0",
47+
"@adobe/eslint-config-helix": "1.3.1",
4848
"@adobe/helix-deploy": "4.12.2",
4949
"@adobe/helix-shared-config": "1.4.6",
5050
"@adobe/helix-testutils": "0.4.10",

test/data-source.test.js

Lines changed: 88 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212
/* eslint-env mocha */
13+
/* eslint-disable no-console */
1314
const assert = require('assert');
1415
const querystring = require('querystring');
1516
const dataSource = require('../src/data-source.js');
@@ -57,97 +58,113 @@ describe('Data Source Tests', () => {
5758
});
5859

5960
it('src parameters allows for different scheme', () => {
60-
assert.equal(dataSource({
61-
url: `https://www.example.com/foo?${querystring.stringify({
62-
src: 'onedrive://drives/123123/items/234234',
63-
})}`,
64-
}, context),
65-
'onedrive://drives/123123/items/234234');
61+
assert.equal(
62+
dataSource({
63+
url: `https://www.example.com/foo?${querystring.stringify({
64+
src: 'onedrive://drives/123123/items/234234',
65+
})}`,
66+
}, context),
67+
'onedrive://drives/123123/items/234234',
68+
);
6669
});
6770

6871
it('returns data source for `src` parameter', () => {
69-
assert.equal(dataSource({
70-
url: `https://www.example.com/foo?${querystring.stringify({
71-
src: 'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
72-
hlx_limit: '1',
73-
foo: 'bar',
74-
})}`,
75-
}, context),
76-
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2');
72+
assert.equal(
73+
dataSource({
74+
url: `https://www.example.com/foo?${querystring.stringify({
75+
src: 'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
76+
hlx_limit: '1',
77+
foo: 'bar',
78+
})}`,
79+
}, context),
80+
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
81+
);
7782
});
7883

7984
it('returns data source for `src` parameter with different scheme', () => {
80-
assert.equal(dataSource({
81-
url: `https://www.example.com/foo?${querystring.stringify({
82-
src: 'onedrive://drives/1234/items/5677?a=1&b=2',
83-
hlx_limit: '1',
84-
foo: 'bar',
85-
})}`,
86-
}, context),
87-
'onedrive://drives/1234/items/5677?a=1&b=2');
85+
assert.equal(
86+
dataSource({
87+
url: `https://www.example.com/foo?${querystring.stringify({
88+
src: 'onedrive://drives/1234/items/5677?a=1&b=2',
89+
hlx_limit: '1',
90+
foo: 'bar',
91+
})}`,
92+
}, context),
93+
'onedrive://drives/1234/items/5677?a=1&b=2',
94+
);
8895
});
8996

9097
it('returns data source for backward compat path parameter with no query', () => {
91-
assert.equal(dataSource({
92-
url: 'https://www.example.com/foo',
93-
}, {
94-
log,
95-
pathInfo: {
96-
suffix: '/https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
97-
},
98-
}),
99-
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2');
98+
assert.equal(
99+
dataSource({
100+
url: 'https://www.example.com/foo',
101+
}, {
102+
log,
103+
pathInfo: {
104+
suffix: '/https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
105+
},
106+
}),
107+
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
108+
);
100109
});
101110

102111
it('returns data source for backward compat path parameter and params', () => {
103-
assert.equal(dataSource({
104-
url: `https://www.example.com/foo?${querystring.stringify({
105-
a: 1,
106-
b: 2,
107-
hlx_limit: 1,
108-
})}`,
109-
}, {
110-
log,
111-
pathInfo: {
112-
suffix: '/https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500',
113-
},
114-
}),
115-
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2');
112+
assert.equal(
113+
dataSource({
114+
url: `https://www.example.com/foo?${querystring.stringify({
115+
a: 1,
116+
b: 2,
117+
hlx_limit: 1,
118+
})}`,
119+
}, {
120+
log,
121+
pathInfo: {
122+
suffix: '/https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500',
123+
},
124+
}),
125+
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
126+
);
116127
});
117128

118129
it('returns data source for escaped path', () => {
119-
assert.equal(dataSource({
120-
url: 'https://www.example.com/foo',
121-
}, {
122-
log,
123-
pathInfo: {
124-
suffix: `/${querystring.escape('https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2')}`,
125-
},
126-
}),
127-
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2');
130+
assert.equal(
131+
dataSource({
132+
url: 'https://www.example.com/foo',
133+
}, {
134+
log,
135+
pathInfo: {
136+
suffix: `/${querystring.escape('https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2')}`,
137+
},
138+
}),
139+
'https://adobeioruntime.net/api/v1/web/helix/helix-services/[email protected]/error500?a=1&b=2',
140+
);
128141
});
129142

130143
it('returns data source for escaped and mangled path', () => {
131-
assert.equal(dataSource({
132-
url: 'https://www.example.com/foo',
133-
}, {
134-
log,
135-
pathInfo: {
136-
suffix: '/https:%2F%2Fwww.youtube.com%2Fwatch%3Fv=TTCVn4EByfI',
137-
},
138-
}),
139-
'https://www.youtube.com/watch?v=TTCVn4EByfI');
144+
assert.equal(
145+
dataSource({
146+
url: 'https://www.example.com/foo',
147+
}, {
148+
log,
149+
pathInfo: {
150+
suffix: '/https:%2F%2Fwww.youtube.com%2Fwatch%3Fv=TTCVn4EByfI',
151+
},
152+
}),
153+
'https://www.youtube.com/watch?v=TTCVn4EByfI',
154+
);
140155
});
141156

142157
it('returns data source for unescaped and mangled path', () => {
143-
assert.equal(dataSource({
144-
url: 'https://www.example.com/foo',
145-
}, {
146-
log,
147-
pathInfo: {
148-
suffix: '/https:/www.youtube.com/watch?v=TTCVn4EByfI',
149-
},
150-
}),
151-
'https://www.youtube.com/watch?v=TTCVn4EByfI');
158+
assert.equal(
159+
dataSource({
160+
url: 'https://www.example.com/foo',
161+
}, {
162+
log,
163+
pathInfo: {
164+
suffix: '/https:/www.youtube.com/watch?v=TTCVn4EByfI',
165+
},
166+
}),
167+
'https://www.youtube.com/watch?v=TTCVn4EByfI',
168+
);
152169
});
153170
});

test/index.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
process.env.HELIX_FETCH_FORCE_HTTP1 = true;
1313

1414
/* eslint-env mocha */
15+
/* eslint-disable no-console */
16+
1517
const assert = require('assert');
1618
const querystring = require('querystring');
1719
const proxyquire = require('proxyquire');

0 commit comments

Comments
 (0)