Skip to content

Commit 0164f35

Browse files
committed
Fix tests
1 parent 793509a commit 0164f35

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"changelog": "github_changelog_generator && git add CHANGELOG.md && git commit -am \"Updating changelog\"",
3636
"compile": "shx rm -rf lib/ && babel -d lib/ src/",
3737
"watch": "shx rm -rf lib/ && babel --watch -d lib/ src/",
38-
"lint": "standard src/**/*.js test/**/*.js --fix",
38+
"lint": "standard --fix",
3939
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts",
4040
"test": "npm run lint && npm run test-node && npm run testee",
4141
"test-node": "mocha --opts mocha.opts",

src/service-module/service-module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getShortName, getNameFromPath, stripSlashes } from '../utils'
1+
import { getShortName, getNameFromPath } from '../utils'
22
import makeState from './state'
33
import makeGetters from './getters'
44
import makeMutations from './mutations'

test/node.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11

22
import chai from 'chai/chai'
3-
import store from './fixtures/store'
43
import { isNode, isBrowser } from '../src/utils'
5-
// import feathersVuex from '../src/index'
6-
// require('./vuex.test.js')
74

85
const assert = chai.assert
96

test/service-module/actions.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ describe('Service Module - Actions', () => {
223223
'component-query-one'
224224
]
225225

226-
227226
actions.find.call({$store: store}, { query: {}, qid: qids[0] })
228227
.then(response => actions.find.call({$store: store}, { query: {}, qid: qids[1] }))
229228
.then(response => {
@@ -232,9 +231,9 @@ describe('Service Module - Actions', () => {
232231
assert(ids.length === 10, 'ten ids were returned in this page')
233232
assert(limit === 10, 'limit matches the default pagination limit on the server')
234233
assert(skip === 0, 'skip was correct')
235-
assert(total === 10, 'total was correct')
234+
assert(total === 10, 'total was correct')
236235
})
237-
236+
238237
done()
239238
})
240239
})

test/service-module/getters.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const options = {
88
autoRemove: false
99
}
1010

11-
const { get, find, list, current } = makeServiceGetters('todos', options)
11+
const { find, list } = makeServiceGetters('todos', options)
1212
const { addItems } = makeServiceMutations('todos', options)
1313

1414
describe('Service Module - Getters', function () {
@@ -17,7 +17,7 @@ describe('Service Module - Getters', function () {
1717
this.items = [
1818
{ _id: 1, otherField: true, test: true },
1919
{ _id: 2, otherField: true, test: true },
20-
{ _id: 3, otherField: true, test: false}
20+
{ _id: 3, otherField: true, test: false }
2121
]
2222
addItems(state, this.items)
2323
this.state = state
@@ -42,7 +42,7 @@ describe('Service Module - Getters', function () {
4242
})
4343

4444
it('find with query', function () {
45-
const { state, items } = this
45+
const { state } = this
4646
const params = { query: { test: false } }
4747
const results = find(state)(params)
4848

@@ -54,7 +54,7 @@ describe('Service Module - Getters', function () {
5454
})
5555

5656
it('find with limit', function () {
57-
const { state, items } = this
57+
const { state } = this
5858
const params = { query: { $limit: 1 } }
5959
const results = find(state)(params)
6060

@@ -66,7 +66,7 @@ describe('Service Module - Getters', function () {
6666
})
6767

6868
it('find with skip', function () {
69-
const { state, items } = this
69+
const { state } = this
7070
const params = { query: { $skip: 1 } }
7171
const results = find(state)(params)
7272

@@ -79,7 +79,7 @@ describe('Service Module - Getters', function () {
7979
})
8080

8181
it('find with limit and skip', function () {
82-
const { state, items } = this
82+
const { state } = this
8383
const params = { query: { $limit: 1, $skip: 1 } }
8484
const results = find(state)(params)
8585

@@ -91,7 +91,7 @@ describe('Service Module - Getters', function () {
9191
})
9292

9393
it('find with select', function () {
94-
const { state, items } = this
94+
const { state } = this
9595
const params = { query: { $select: ['otherField'] } }
9696
const results = find(state)(params)
9797

0 commit comments

Comments
 (0)