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:
Rich Trott 2018-03-05 15:50:22 -08:00
parent 282e65cfe3
commit 3c31bfff65
14 changed files with 25 additions and 25 deletions

View File

@ -17,7 +17,7 @@ function main({ type, n }) {
encodemany: {
'\u0080\u0083\u0089': 'bar',
'\u008C\u008E\u0099': 'quux',
xyzzy: '\u00A5q\u00A3r'
'xyzzy': '\u00A5q\u00A3r'
},
encodelast: {
foo: 'bar',

View File

@ -43,7 +43,7 @@ function search(target, base) {
}
const extensionFormatMap = {
__proto__: null,
'__proto__': null,
'.mjs': 'esm',
'.json': 'json',
'.node': 'addon',

View File

@ -102,9 +102,9 @@ const testData = [
meta: {
added: ['v5.3.0', 'v4.2.0'],
changes: [
{ version: 'v4.2.0',
{ 'version': 'v4.2.0',
'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.'
}
]

View File

@ -9,8 +9,8 @@ function execute(options) {
http.createServer(function(req, res) {
const expectHeaders = {
'x-foo': 'boom',
cookie: 'a=1; b=2; c=3',
connection: 'close'
'cookie': 'a=1; b=2; c=3',
'connection': 'close'
};
// no Host header when you set headers an array

View File

@ -37,10 +37,10 @@ http.createServer(function(req, res) {
'close'
];
const expectHeaders = {
host: `localhost:${this.address().port}`,
'host': `localhost:${this.address().port}`,
'transfer-encoding': 'CHUNKED',
'x-bar': 'yoyoyo',
connection: 'close'
'connection': 'close'
};
const expectRawTrailers = [
'x-bAr',
@ -96,9 +96,9 @@ http.createServer(function(req, res) {
'chunked'
];
const expectHeaders = {
trailer: 'x-foo',
date: null,
connection: 'close',
'trailer': 'x-foo',
'date': null,
'connection': 'close',
'transfer-encoding': 'chunked'
};
res.rawHeaders[3] = null;

View File

@ -33,7 +33,7 @@ server.listen(0, common.mustCall(() => {
const client = http2.connect(`http://localhost:${server.address().port}`);
const req = client.request({
':method': 'POST',
expect: '100-continue'
'expect': '100-continue'
});
let gotContinue = false;

View File

@ -29,7 +29,7 @@ server.on('listening', common.mustCall(() => {
const client = http2.connect(`http://localhost:${server.address().port}`);
const req = client.request({
':method': 'POST',
expect: '100-continue'
'expect': '100-continue'
});
let gotContinue = false;

View File

@ -30,7 +30,7 @@ function nextTest(testsToRun) {
':method': 'GET',
':scheme': 'http',
':authority': `localhost:${port}`,
expect: expectValue
'expect': expectValue
});
req.on('response', common.mustCall((headers) => {

View File

@ -41,8 +41,8 @@ server.on('listening', common.mustCall(() => {
const req = client.request({
':path': '/',
abc: [1, 2, 3],
cookie: ['a=b', 'c=d', 'e=f'],
'abc': [1, 2, 3],
'cookie': ['a=b', 'c=d', 'e=f'],
});
req.resume();

View File

@ -17,7 +17,7 @@ function onStream(stream, headers, flags) {
common.expectsError(() => {
stream.additionalHeaders({
':status': 123,
abc: 123
'abc': 123
});
}, { code: 'ERR_HTTP2_INVALID_STREAM' });
}

View File

@ -40,7 +40,7 @@ server.listen(0, common.mustCall(() => {
tests.forEach((test) => {
const req = client.request({
':method': 'POST',
rstcode: test[0]
'rstcode': test[0]
});
req.on('close', common.mustCall((code) => {
assert.strictEqual(code, test[0]);

View File

@ -75,8 +75,8 @@ const qsTestCases = [
['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', 'a=b&=&c=d', { a: 'b', '': '', c: 'd' }],
['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' }],
['&&foo=bar&&', 'foo=bar', { foo: 'bar' }],
['&', '', {}],
['&&&&', '', {}],

View File

@ -88,7 +88,7 @@ async function circular() {
async function circular2() {
const sourceMap = {
root: `
'root': `
import * as a from './a.mjs';
import * as b from './b.mjs';
if (!('fromA' in a))

View File

@ -120,10 +120,10 @@ module.exports = function(context) {
}
return {
TemplateLiteral: checkLiteral,
Literal: checkLiteral,
CallExpression: checkRegExpStart,
NewExpression: checkRegExpStart,
'TemplateLiteral': checkLiteral,
'Literal': checkLiteral,
'CallExpression': checkRegExpStart,
'NewExpression': checkRegExpStart,
'CallExpression:exit': checkRegExpEnd,
'NewExpression:exit': checkRegExpEnd
};