Skip to content

Commit 1ab6bdb

Browse files
committed
[eslint] enable quotes rule
1 parent d26c6a0 commit 1ab6bdb

14 files changed

+44
-41
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"rules": {
1111
"indent": ["error", 4],
1212
"key-spacing": "error",
13+
"quotes": ["error", "single", {
14+
"avoidEscape": true,
15+
}],
1316
"semi": ["error", "always"],
1417
"space-before-function-paren": ["error", {
1518
"anonymous": "always",

lib/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
var deepEqual = require('deep-equal');
44
var defined = require('defined');

test/circular-things.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tap.test('circular test', function (assert) {
3737
);
3838
}));
3939

40-
test("circular", function (t) {
40+
test('circular', function (t) {
4141
t.plan(1);
4242
var circular = {};
4343
circular.circular = circular;

test/comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ tap.test('non-string types', function (assert) {
132132
t.comment(42);
133133
t.comment(6.66);
134134
t.comment({});
135-
t.comment({"answer": 42});
135+
t.comment({'answer': 42});
136136
function ConstructorFunction() {}
137137
t.comment(new ConstructorFunction());
138138
t.comment(ConstructorFunction);

test/create_multiple_streams.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tape.test('createMultipleStreams', function (tt) {
2525
});
2626

2727
th.onFinish(function () {
28-
tt.equal(th._results.count, 2, "harness test ran");
28+
tt.equal(th._results.count, 2, 'harness test ran');
2929
tt.equal(th._results.fail, 0, "harness test didn't fail");
3030
});
3131
});

test/deep-equal-failure.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ tap.test('deep equal failure', function (assert) {
6464
});
6565
});
6666

67-
test("deep equal", function (t) {
67+
test('deep equal', function (t) {
6868
t.plan(1);
6969
t.equal({a: 1}, {b: 2});
7070
});
@@ -125,7 +125,7 @@ tap.test('deep equal failure, depth 6, with option', function (assert) {
125125
});
126126
});
127127

128-
test("deep equal", {objectPrintDepth: 6}, function (t) {
128+
test('deep equal', {objectPrintDepth: 6}, function (t) {
129129
t.plan(1);
130130
t.equal({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } });
131131
});
@@ -186,7 +186,7 @@ tap.test('deep equal failure, depth 6, without option', function (assert) {
186186
});
187187
});
188188

189-
test("deep equal", function (t) {
189+
test('deep equal', function (t) {
190190
t.plan(1);
191191
t.equal({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } });
192192
});

test/end-as-callback.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
22

3-
var tap = require("tap");
4-
var forEach = require("for-each");
5-
var tape = require("../");
3+
var tap = require('tap');
4+
var forEach = require('for-each');
5+
var tape = require('../');
66
var concat = require('concat-stream');
77

8-
tap.test("tape assert.end as callback", function (tt) {
8+
tap.test('tape assert.end as callback', function (tt) {
99
var test = tape.createHarness({ exit: false });
1010

1111
test.createStream().pipe(concat(function (rows) {
@@ -28,35 +28,35 @@ tap.test("tape assert.end as callback", function (tt) {
2828
tt.end();
2929
}));
3030

31-
test("do a task and write", function (assert) {
32-
fakeAsyncTask("foo", function (err, value) {
31+
test('do a task and write', function (assert) {
32+
fakeAsyncTask('foo', function (err, value) {
3333
assert.ifError(err);
34-
assert.equal(value, "taskfoo");
34+
assert.equal(value, 'taskfoo');
3535

36-
fakeAsyncWrite("bar", assert.end);
36+
fakeAsyncWrite('bar', assert.end);
3737
});
3838
});
3939

40-
test("do a task and write fail", function (assert) {
41-
fakeAsyncTask("bar", function (err, value) {
40+
test('do a task and write fail', function (assert) {
41+
fakeAsyncTask('bar', function (err, value) {
4242
assert.ifError(err);
43-
assert.equal(value, "taskbar");
43+
assert.equal(value, 'taskbar');
4444

45-
fakeAsyncWriteFail("baz", assert.end);
45+
fakeAsyncWriteFail('baz', assert.end);
4646
});
4747
});
4848
});
4949

5050
function fakeAsyncTask(name, cb) {
51-
cb(null, "task" + name);
51+
cb(null, 'task' + name);
5252
}
5353

5454
function fakeAsyncWrite(name, cb) {
5555
cb(null);
5656
}
5757

5858
function fakeAsyncWriteFail(name, cb) {
59-
cb(new Error("fail"));
59+
cb(new Error('fail'));
6060
}
6161

6262
/**

test/not-deep-equal-failure.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ tap.test('deep equal failure', function (assert) {
6464
});
6565
});
6666

67-
test("not deep equal", function (t) {
67+
test('not deep equal', function (t) {
6868
t.plan(1);
6969
t.notDeepEqual({b: 2}, {b: 2});
7070
});
@@ -125,7 +125,7 @@ tap.test('not deep equal failure, depth 6, with option', function (assert) {
125125
});
126126
});
127127

128-
test("not deep equal", {objectPrintDepth: 6}, function (t) {
128+
test('not deep equal', {objectPrintDepth: 6}, function (t) {
129129
t.plan(1);
130130
t.notDeepEqual({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } });
131131
});
@@ -186,7 +186,7 @@ tap.test('not deep equal failure, depth 6, without option', function (assert) {
186186
});
187187
});
188188

189-
test("not deep equal", function (t) {
189+
test('not deep equal', function (t) {
190190
t.plan(1);
191191
t.notDeepEqual({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } });
192192
});

test/not-equal-failure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ tap.test('not equal failure', function (assert) {
6262
});
6363
});
6464

65-
test("not equal", function (t) {
65+
test('not equal', function (t) {
6666
t.plan(1);
6767
t.notEqual(2, 2);
6868
});

test/onFailure.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
'use strict';
22

3-
var tap = require("tap");
4-
var tape = require("../").createHarness();
3+
var tap = require('tap');
4+
var tape = require('../').createHarness();
55

66
//Because this test passing depends on a failure,
77
//we must direct the failing output of the inner test
88
var noop = function () {};
99
var mockSink = {on: noop, removeListener: noop, emit: noop, end: noop};
1010
tape.createStream().pipe(mockSink);
1111

12-
tap.test("on failure", { timeout: 1000 }, function (tt) {
12+
tap.test('on failure', { timeout: 1000 }, function (tt) {
1313
tt.plan(1);
1414

15-
tape("dummy test", function (t) {
15+
tape('dummy test', function (t) {
1616
t.fail();
1717
t.end();
1818
});
1919

2020
tape.onFailure(function () {
21-
tt.pass("tape ended");
21+
tt.pass('tape ended');
2222
});
2323
});

0 commit comments

Comments
 (0)