Skip to content

Commit faa8554

Browse files
committed
Lint fix
1 parent d564028 commit faa8554

File tree

3 files changed

+69
-55
lines changed

3 files changed

+69
-55
lines changed

test/service-module/module.getters.test.ts

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ describe('Service Module - Getters', function() {
301301
assert(results.total === 3, 'total was correct')
302302
})
303303

304-
it('find with sort ascending on integers', function () {
304+
it('find with sort ascending on integers', function() {
305305
const { state } = this
306306
const params = {
307307
query: {
@@ -310,13 +310,15 @@ describe('Service Module - Getters', function() {
310310
}
311311
const results = find(state)(params)
312312

313-
results.data.map(i => i.age).reduce((oldest, current) => {
314-
assert(current > oldest, 'age should have been older than previous')
315-
return current
316-
}, 0)
313+
results.data
314+
.map(i => i.age)
315+
.reduce((oldest, current) => {
316+
assert(current > oldest, 'age should have been older than previous')
317+
return current
318+
}, 0)
317319
})
318320

319-
it('find with sort descending on integers', function () {
321+
it('find with sort descending on integers', function() {
320322
const { state } = this
321323
const params = {
322324
query: {
@@ -325,13 +327,15 @@ describe('Service Module - Getters', function() {
325327
}
326328
const results = find(state)(params)
327329

328-
results.data.map(i => i.age).reduce((oldest, current) => {
329-
assert(current < oldest, 'age should have been younger than previous')
330-
return current
331-
}, 100)
330+
results.data
331+
.map(i => i.age)
332+
.reduce((oldest, current) => {
333+
assert(current < oldest, 'age should have been younger than previous')
334+
return current
335+
}, 100)
332336
})
333337

334-
it('find with sort ascending on floats', function () {
338+
it('find with sort ascending on floats', function() {
335339
const { state } = this
336340
const params = {
337341
query: {
@@ -340,13 +344,18 @@ describe('Service Module - Getters', function() {
340344
}
341345
const results = find(state)(params)
342346

343-
results.data.map(i => i.teethRemaining).reduce((oldest, current) => {
344-
assert(current > oldest, 'teethRemaining should have been older than previous')
345-
return current
346-
}, 0)
347+
results.data
348+
.map(i => i.teethRemaining)
349+
.reduce((oldest, current) => {
350+
assert(
351+
current > oldest,
352+
'teethRemaining should have been older than previous'
353+
)
354+
return current
355+
}, 0)
347356
})
348357

349-
it('find with sort descending on floats', function () {
358+
it('find with sort descending on floats', function() {
350359
const { state } = this
351360
const params = {
352361
query: {
@@ -355,9 +364,14 @@ describe('Service Module - Getters', function() {
355364
}
356365
const results = find(state)(params)
357366

358-
results.data.map(i => i.teethRemaining).reduce((oldest, current) => {
359-
assert(current < oldest, 'teethRemaining should have been younger than previous')
360-
return current
361-
}, 100)
367+
results.data
368+
.map(i => i.teethRemaining)
369+
.reduce((oldest, current) => {
370+
assert(
371+
current < oldest,
372+
'teethRemaining should have been younger than previous'
373+
)
374+
return current
375+
}, 100)
362376
})
363377
})

test/service-module/service-module.actions.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { feathersRestClient as feathersClient } from '../fixtures/feathers-clien
1010
import Vuex, { mapActions } from 'vuex'
1111
import memory from 'feathers-memory'
1212
import { clearModels } from '../../src/service-module/global-models'
13-
import { makeStore, makeStoreWithAtypicalIds} from '../test-utils'
13+
import { makeStore, makeStoreWithAtypicalIds } from '../test-utils'
1414

1515
interface RootState {
1616
'my-todos': ServiceState
@@ -71,7 +71,7 @@ function makeContext() {
7171
remove() {
7272
return Promise.reject(new Error('remove error'))
7373
},
74-
setup() { }
74+
setup() {}
7575
})
7676

7777
const { makeServicePlugin, BaseModel } = feathersVuex(feathersClient, {
@@ -728,7 +728,7 @@ describe('Service Module - Actions', () => {
728728
})
729729
})
730730

731-
describe('Create', function () {
731+
describe('Create', function() {
732732
it('updates store list state on service success', done => {
733733
const { makeServicePlugin, Todo } = makeContext()
734734
const store = new Vuex.Store<RootState>({

test/utils.test.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ interface RootState {
1919
auth: AuthState
2020
}
2121

22-
describe('Utils', function () {
23-
before(function () {
22+
describe('Utils', function() {
23+
before(function() {
2424
const { makeServicePlugin, makeAuthPlugin, BaseModel } = feathersVuex(
2525
feathersClient,
2626
{ serverAlias: 'utils' }
@@ -38,7 +38,7 @@ describe('Utils', function () {
3838
User
3939
})
4040
})
41-
it('properly populates auth', function () {
41+
it('properly populates auth', function() {
4242
const store = new Vuex.Store<RootState>({
4343
plugins: [
4444
this.makeServicePlugin({
@@ -76,8 +76,8 @@ describe('Utils', function () {
7676
})
7777
})
7878

79-
describe('Inflections', function () {
80-
it('properly inflects the service prefix', function () {
79+
describe('Inflections', function() {
80+
it('properly inflects the service prefix', function() {
8181
const decisionTable = [
8282
['todos', 'todos'],
8383
['TODOS', 'tODOS'],
@@ -96,7 +96,7 @@ describe('Utils', function () {
9696
})
9797
})
9898

99-
it('properly inflects the service capitalization', function () {
99+
it('properly inflects the service capitalization', function() {
100100
const decisionTable = [
101101
['todos', 'Todos'],
102102
['TODOS', 'TODOS'],
@@ -127,8 +127,8 @@ describe('Utils', function () {
127127
})
128128
})
129129

130-
describe('Pagination', function () {
131-
it('getQueryInfo', function () {
130+
describe('Pagination', function() {
131+
it('getQueryInfo', function() {
132132
const params = {
133133
qid: 'main-list',
134134
query: {
@@ -145,28 +145,28 @@ describe('Pagination', function () {
145145
}
146146
const info = getQueryInfo(params, response)
147147
const expected = {
148-
'qid': 'main-list',
149-
'query': {
150-
'test': true,
151-
'$limit': 10,
152-
'$skip': 0
148+
qid: 'main-list',
149+
query: {
150+
test: true,
151+
$limit: 10,
152+
$skip: 0
153153
},
154-
'queryId': '{"test":true}',
155-
'queryParams': {
156-
'test': true
154+
queryId: '{"test":true}',
155+
queryParams: {
156+
test: true
157157
},
158-
'pageParams': {
159-
'$limit': 10,
160-
'$skip': 0
158+
pageParams: {
159+
$limit: 10,
160+
$skip: 0
161161
},
162-
'pageId': '{"$limit":10,"$skip":0}'
162+
pageId: '{"$limit":10,"$skip":0}'
163163
}
164164
const diff = deepDiff(info, expected)
165165

166166
assert.deepEqual(info, expected, 'query info formatted correctly')
167167
})
168168

169-
it('getQueryInfo no limit or skip', function () {
169+
it('getQueryInfo no limit or skip', function() {
170170
const params = {
171171
qid: 'main-list',
172172
query: {
@@ -181,22 +181,22 @@ describe('Pagination', function () {
181181
}
182182
const info = getQueryInfo(params, response)
183183
const expected = {
184-
'qid': 'main-list',
185-
'query': {
186-
'test': true
184+
qid: 'main-list',
185+
query: {
186+
test: true
187187
},
188-
'queryId': '{"test":true}',
189-
'queryParams': {
190-
'test': true
188+
queryId: '{"test":true}',
189+
queryParams: {
190+
test: true
191191
},
192-
'pageParams': {
193-
'$limit': 10,
194-
'$skip': 0
192+
pageParams: {
193+
$limit: 10,
194+
$skip: 0
195195
},
196-
'pageId': '{"$limit":10,"$skip":0}'
196+
pageId: '{"$limit":10,"$skip":0}'
197197
}
198198
const diff = deepDiff(info, expected)
199199

200200
assert.deepEqual(info, expected, 'query info formatted correctly')
201201
})
202-
})
202+
})

0 commit comments

Comments
 (0)