Use double quotes

Convert existing mix of double quotes and single quotes to only use
double quotes unless the string contains double quotes.
This commit is contained in:
Hornwitser committed 2020-06-17 20:53:18 +02:00
1 parent efd759bec5
commit 34aaeee354
48 files changed
+708 -712

No files matched your search

+11 -11
View File
@@ -1,8 +1,8 @@
const assert = require('assert').strict;
const assert = require("assert").strict;
const mock = require('../../../test/mock');
const instance = require('../instance');
const info = require('../info');
const mock = require("../../../test/mock");
const instance = require("../instance");
const info = require("../info");
describe("statistics_exporter plugin", function() {
@@ -16,7 +16,7 @@ describe("statistics_exporter plugin", function() {
describe(".onMetrics()", function() {
it("should record statistics", async function() {
instancePlugin.instance.server.rconCommandResults.set(
'/sc statistics_exporter.export()',
"/sc statistics_exporter.export()",
JSON.stringify({
game_tick: 100,
player_count: 3,
@@ -39,19 +39,19 @@ describe("statistics_exporter plugin", function() {
await instancePlugin.onMetrics();
assert.equal(instance._instancePlayerCount.labels('7357').get(), 3);
assert.equal(instance._instanceGameTicksTotal.labels('7357').get(), 100);
assert.equal(instance._instancePlayerCount.labels("7357").get(), 3);
assert.equal(instance._instanceGameTicksTotal.labels("7357").get(), 100);
assert.equal(instance._instanceForceFlowStatistics.labels(
'7357', 'player', 'item_production_statistics', 'input', 'inserter').get(),
"7357", "player", "item_production_statistics", "input", "inserter").get(),
10);
assert.equal(instance._instanceGameFlowStatistics.labels(
'7357', 'pollution_statistics', 'input', 'boiler').get(),
"7357", "pollution_statistics", "input", "boiler").get(),
2000);
});
it("should pass on JSON parse errors", async function() {
let string = 'An error occured\n';
let string = "An error occured\n";
instancePlugin.instance.server.rconCommandResults.set(
'/sc statistics_exporter.export()', string
"/sc statistics_exporter.export()", string
);
let errorMessage;