Skip to content

Commit a2433d5

Browse files
authored
use single quotes only
Unifies the test file to use single quotes only.
1 parent d4cf91a commit a2433d5

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

test.js

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

3-
var Server = require("mqtt/test/server");
3+
var Server = require('mqtt/test/server');
44

5-
var AsyncMQTT = require("./");
5+
var AsyncMQTT = require('./');
66
var AsyncClient = AsyncMQTT.AsyncClient;
77

8-
var test = require("tape");
8+
var test = require('tape');
99

1010
var SERVER_PORT = 1883;
11-
var SERVER_URL = "mqtt://localhost:" + SERVER_PORT;
11+
var SERVER_URL = 'mqtt://localhost:' + SERVER_PORT;
1212

1313
var server = buildServer().listen(SERVER_PORT);
1414
server.unref();
1515

16-
server.on("listening", runTests);
16+
server.on('listening', runTests);
1717

1818
function runTests() {
19-
test("Connect should return an instance of AsyncClient", function (t) {
19+
test('Connect should return an instance of AsyncClient', function (t) {
2020
t.plan(1);
2121
var client = AsyncMQTT.connect(SERVER_URL);
2222

23-
t.ok(client instanceof AsyncClient, "Connect returned an AsyncClient");
23+
t.ok(client instanceof AsyncClient, 'Connect returned an AsyncClient');
2424

2525
client.end();
2626
});
2727

28-
test("Should be able to listen on event on client", function (t) {
28+
test('Should be able to listen on event on client', function (t) {
2929
t.plan(1);
3030

3131
var client = AsyncMQTT.connect(SERVER_URL);
3232

33-
client.once("connect", function () {
34-
t.pass("Connected");
33+
client.once('connect', function () {
34+
t.pass('Connected');
3535
client.end();
3636
});
3737
});
3838

39-
test("Calling end() should resolve once disconnected", function (t) {
39+
test('Calling end() should resolve once disconnected', function (t) {
4040
t.plan(2);
4141

4242
var client = AsyncMQTT.connect(SERVER_URL);
4343

44-
client.on("close", function () {
45-
t.pass("Close event occured");
44+
client.on('close', function () {
45+
t.pass('Close event occured');
4646
});
4747

48-
client.on("connect", function () {
48+
client.on('connect', function () {
4949
// Wait for connect to emit before ending
5050
client.end().then(function(){
51-
t.pass("End resolved");
51+
t.pass('End resolved');
5252
});
5353
});
5454
});
5555

56-
test("Calling subscribe should resolve once subscribed", function (t) {
56+
test('Calling subscribe should resolve once subscribed', function (t) {
5757
t.plan(1);
5858

5959
var client = AsyncMQTT.connect(SERVER_URL);
6060

61-
client.subscribe("example", {
61+
client.subscribe('example', {
6262
qos: 1
6363
}).then(function(){
64-
t.pass("Subscribed");
64+
t.pass('Subscribed');
6565
client.end();
6666
})
6767
});
6868

69-
test("Calling unsubscribe should resolve once completed", function(t){
69+
test('Calling unsubscribe should resolve once completed', function(t){
7070
t.plan(1);
7171

7272
var client = AsyncMQTT.connect(SERVER_URL);
7373

74-
client.subscribe("example", {
74+
client.subscribe('example', {
7575
qos: 1
7676
}).then(function(){
77-
return client.unsubscribe("example");
77+
return client.unsubscribe('example');
7878
}).then(function(){
79-
t.pass("Unsunbscribed");
79+
t.pass('Unsunbscribed');
8080
return client.end();
8181
});
8282
});
8383

84-
test("Calling publish should resolve once completed", function (t) {
84+
test('Calling publish should resolve once completed', function (t) {
8585
t.plan(1);
8686

8787
var client = AsyncMQTT.connect(SERVER_URL);
8888

89-
client.publish("example", "test", {
89+
client.publish('example', 'test', {
9090
qos: 1
9191
}).then(function(){
92-
t.pass("Published");
92+
t.pass('Published');
9393
return client.end();
9494
});
9595
});

0 commit comments

Comments
 (0)