Skip to content

Commit 1fa9074

Browse files
committed
Minor linting for trigger test-suite
1 parent 39fe76c commit 1fa9074

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

test/client/trigger.spec.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { FlowRouter, Route } from 'meteor/ostrio:flow-router-extra';
2+
import { Random } from 'meteor/random';
23

34
Tinytest.addAsync('Client - Triggers - global enter triggers', function(test, next) {
45
var rand = Random.id(), rand2 = Random.id();
@@ -112,26 +113,27 @@ Tinytest.addAsync('Client - Triggers - global enter triggers with "except"', fun
112113
});
113114

114115
Tinytest.addAsync('Client - Triggers - global exit triggers', function (test, next) {
115-
var rand = Random.id(), rand2 = Random.id();
116-
var log = [];
117-
var done =false;
116+
const rand = Random.id();
117+
const rand2 = Random.id();
118+
const log = [];
119+
let done = false;
118120

119121
FlowRouter.route('/' + rand, {
120-
action: function(_params) {
122+
action() {
121123
log.push(1);
122124
}
123125
});
124126

125127
FlowRouter.route('/' + rand2, {
126-
action: function(_params) {
128+
action() {
127129
log.push(2);
128130
}
129131
});
130132

131133
FlowRouter.go('/' + rand);
132134

133135
FlowRouter.triggers.exit([function(context) {
134-
if(done) return;
136+
if (done) return;
135137
test.equal(context.path, '/' + rand);
136138
log.push(0);
137139
}]);
@@ -189,27 +191,28 @@ Tinytest.addAsync('Client - Triggers - global exit triggers with "only"', functi
189191
});
190192

191193
Tinytest.addAsync('Client - Triggers - global exit triggers with "except"', function (test, next) {
192-
var rand = Random.id(), rand2 = Random.id();
193-
var log = [];
194-
var done = false;
194+
const rand = Random.id();
195+
const rand2 = Random.id();
196+
const log = [];
197+
let done = false;
195198

196199
FlowRouter.route('/' + rand, {
197-
action: function(_params) {
200+
action() {
198201
log.push(1);
199202
}
200203
});
201204

202205
FlowRouter.route('/' + rand2, {
203206
name: 'foo',
204-
action: function(_params) {
207+
action() {
205208
log.push(2);
206209
}
207210
});
208211

209212
FlowRouter.go('/' + rand);
210213

211214
FlowRouter.triggers.exit([function(context) {
212-
if(done) return;
215+
if (done) return;
213216
test.equal(context.path, '/' + rand);
214217
log.push(9);
215218
}], {except: ['foo']});

0 commit comments

Comments
 (0)