benchmark,lib,test,tools: use consistent quotes
In preparation for a linting rule, use consistent quotation for properties in objects. PR-URL: https://github.com/nodejs/node/pull/19156 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
parent
282e65cfe3
commit
3c31bfff65
@ -17,7 +17,7 @@ function main({ type, n }) {
|
|||||||
encodemany: {
|
encodemany: {
|
||||||
'\u0080\u0083\u0089': 'bar',
|
'\u0080\u0083\u0089': 'bar',
|
||||||
'\u008C\u008E\u0099': 'quux',
|
'\u008C\u008E\u0099': 'quux',
|
||||||
xyzzy: '\u00A5q\u00A3r'
|
'xyzzy': '\u00A5q\u00A3r'
|
||||||
},
|
},
|
||||||
encodelast: {
|
encodelast: {
|
||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
|
@ -43,7 +43,7 @@ function search(target, base) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const extensionFormatMap = {
|
const extensionFormatMap = {
|
||||||
__proto__: null,
|
'__proto__': null,
|
||||||
'.mjs': 'esm',
|
'.mjs': 'esm',
|
||||||
'.json': 'json',
|
'.json': 'json',
|
||||||
'.node': 'addon',
|
'.node': 'addon',
|
||||||
|
@ -102,9 +102,9 @@ const testData = [
|
|||||||
meta: {
|
meta: {
|
||||||
added: ['v5.3.0', 'v4.2.0'],
|
added: ['v5.3.0', 'v4.2.0'],
|
||||||
changes: [
|
changes: [
|
||||||
{ version: 'v4.2.0',
|
{ 'version': 'v4.2.0',
|
||||||
'pr-url': 'https://github.com/nodejs/node/pull/3276',
|
'pr-url': 'https://github.com/nodejs/node/pull/3276',
|
||||||
description: 'The `error` parameter can now be ' +
|
'description': 'The `error` parameter can now be ' +
|
||||||
'an arrow function.'
|
'an arrow function.'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -9,8 +9,8 @@ function execute(options) {
|
|||||||
http.createServer(function(req, res) {
|
http.createServer(function(req, res) {
|
||||||
const expectHeaders = {
|
const expectHeaders = {
|
||||||
'x-foo': 'boom',
|
'x-foo': 'boom',
|
||||||
cookie: 'a=1; b=2; c=3',
|
'cookie': 'a=1; b=2; c=3',
|
||||||
connection: 'close'
|
'connection': 'close'
|
||||||
};
|
};
|
||||||
|
|
||||||
// no Host header when you set headers an array
|
// no Host header when you set headers an array
|
||||||
|
@ -37,10 +37,10 @@ http.createServer(function(req, res) {
|
|||||||
'close'
|
'close'
|
||||||
];
|
];
|
||||||
const expectHeaders = {
|
const expectHeaders = {
|
||||||
host: `localhost:${this.address().port}`,
|
'host': `localhost:${this.address().port}`,
|
||||||
'transfer-encoding': 'CHUNKED',
|
'transfer-encoding': 'CHUNKED',
|
||||||
'x-bar': 'yoyoyo',
|
'x-bar': 'yoyoyo',
|
||||||
connection: 'close'
|
'connection': 'close'
|
||||||
};
|
};
|
||||||
const expectRawTrailers = [
|
const expectRawTrailers = [
|
||||||
'x-bAr',
|
'x-bAr',
|
||||||
@ -96,9 +96,9 @@ http.createServer(function(req, res) {
|
|||||||
'chunked'
|
'chunked'
|
||||||
];
|
];
|
||||||
const expectHeaders = {
|
const expectHeaders = {
|
||||||
trailer: 'x-foo',
|
'trailer': 'x-foo',
|
||||||
date: null,
|
'date': null,
|
||||||
connection: 'close',
|
'connection': 'close',
|
||||||
'transfer-encoding': 'chunked'
|
'transfer-encoding': 'chunked'
|
||||||
};
|
};
|
||||||
res.rawHeaders[3] = null;
|
res.rawHeaders[3] = null;
|
||||||
|
@ -33,7 +33,7 @@ server.listen(0, common.mustCall(() => {
|
|||||||
const client = http2.connect(`http://localhost:${server.address().port}`);
|
const client = http2.connect(`http://localhost:${server.address().port}`);
|
||||||
const req = client.request({
|
const req = client.request({
|
||||||
':method': 'POST',
|
':method': 'POST',
|
||||||
expect: '100-continue'
|
'expect': '100-continue'
|
||||||
});
|
});
|
||||||
|
|
||||||
let gotContinue = false;
|
let gotContinue = false;
|
||||||
|
@ -29,7 +29,7 @@ server.on('listening', common.mustCall(() => {
|
|||||||
const client = http2.connect(`http://localhost:${server.address().port}`);
|
const client = http2.connect(`http://localhost:${server.address().port}`);
|
||||||
const req = client.request({
|
const req = client.request({
|
||||||
':method': 'POST',
|
':method': 'POST',
|
||||||
expect: '100-continue'
|
'expect': '100-continue'
|
||||||
});
|
});
|
||||||
|
|
||||||
let gotContinue = false;
|
let gotContinue = false;
|
||||||
|
@ -30,7 +30,7 @@ function nextTest(testsToRun) {
|
|||||||
':method': 'GET',
|
':method': 'GET',
|
||||||
':scheme': 'http',
|
':scheme': 'http',
|
||||||
':authority': `localhost:${port}`,
|
':authority': `localhost:${port}`,
|
||||||
expect: expectValue
|
'expect': expectValue
|
||||||
});
|
});
|
||||||
|
|
||||||
req.on('response', common.mustCall((headers) => {
|
req.on('response', common.mustCall((headers) => {
|
||||||
|
@ -41,8 +41,8 @@ server.on('listening', common.mustCall(() => {
|
|||||||
|
|
||||||
const req = client.request({
|
const req = client.request({
|
||||||
':path': '/',
|
':path': '/',
|
||||||
abc: [1, 2, 3],
|
'abc': [1, 2, 3],
|
||||||
cookie: ['a=b', 'c=d', 'e=f'],
|
'cookie': ['a=b', 'c=d', 'e=f'],
|
||||||
});
|
});
|
||||||
req.resume();
|
req.resume();
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ function onStream(stream, headers, flags) {
|
|||||||
common.expectsError(() => {
|
common.expectsError(() => {
|
||||||
stream.additionalHeaders({
|
stream.additionalHeaders({
|
||||||
':status': 123,
|
':status': 123,
|
||||||
abc: 123
|
'abc': 123
|
||||||
});
|
});
|
||||||
}, { code: 'ERR_HTTP2_INVALID_STREAM' });
|
}, { code: 'ERR_HTTP2_INVALID_STREAM' });
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ server.listen(0, common.mustCall(() => {
|
|||||||
tests.forEach((test) => {
|
tests.forEach((test) => {
|
||||||
const req = client.request({
|
const req = client.request({
|
||||||
':method': 'POST',
|
':method': 'POST',
|
||||||
rstcode: test[0]
|
'rstcode': test[0]
|
||||||
});
|
});
|
||||||
req.on('close', common.mustCall((code) => {
|
req.on('close', common.mustCall((code) => {
|
||||||
assert.strictEqual(code, test[0]);
|
assert.strictEqual(code, test[0]);
|
||||||
|
@ -75,8 +75,8 @@ const qsTestCases = [
|
|||||||
['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }],
|
['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }],
|
||||||
['a=b&c&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
|
['a=b&c&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
|
||||||
['a=b&c=&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
|
['a=b&c=&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
|
||||||
['a=b&=c&d=e', 'a=b&=c&d=e', { a: 'b', '': 'c', d: 'e' }],
|
['a=b&=c&d=e', 'a=b&=c&d=e', { 'a': 'b', '': 'c', 'd': 'e' }],
|
||||||
['a=b&=&c=d', 'a=b&=&c=d', { a: 'b', '': '', c: 'd' }],
|
['a=b&=&c=d', 'a=b&=&c=d', { 'a': 'b', '': '', 'c': 'd' }],
|
||||||
['&&foo=bar&&', 'foo=bar', { foo: 'bar' }],
|
['&&foo=bar&&', 'foo=bar', { foo: 'bar' }],
|
||||||
['&', '', {}],
|
['&', '', {}],
|
||||||
['&&&&', '', {}],
|
['&&&&', '', {}],
|
||||||
|
@ -88,7 +88,7 @@ async function circular() {
|
|||||||
|
|
||||||
async function circular2() {
|
async function circular2() {
|
||||||
const sourceMap = {
|
const sourceMap = {
|
||||||
root: `
|
'root': `
|
||||||
import * as a from './a.mjs';
|
import * as a from './a.mjs';
|
||||||
import * as b from './b.mjs';
|
import * as b from './b.mjs';
|
||||||
if (!('fromA' in a))
|
if (!('fromA' in a))
|
||||||
|
@ -120,10 +120,10 @@ module.exports = function(context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
TemplateLiteral: checkLiteral,
|
'TemplateLiteral': checkLiteral,
|
||||||
Literal: checkLiteral,
|
'Literal': checkLiteral,
|
||||||
CallExpression: checkRegExpStart,
|
'CallExpression': checkRegExpStart,
|
||||||
NewExpression: checkRegExpStart,
|
'NewExpression': checkRegExpStart,
|
||||||
'CallExpression:exit': checkRegExpEnd,
|
'CallExpression:exit': checkRegExpEnd,
|
||||||
'NewExpression:exit': checkRegExpEnd
|
'NewExpression:exit': checkRegExpEnd
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user