5
5
*/
6
6
import { assert } from 'chai'
7
7
import { assertGetter } from '../test-utils'
8
- import makeServiceMutations from '../../src/service-module/service-module.mutations'
8
+ import makeServiceMutations , {
9
+ PendingServiceMethodName
10
+ } from '../../src/service-module/service-module.mutations'
9
11
import makeServiceState from '../../src/service-module/service-module.state'
10
12
import errors from '@feathersjs/errors'
11
13
import Vue from 'vue'
@@ -1143,7 +1145,14 @@ describe('Service Module - Mutations', function() {
1143
1145
describe ( 'Pending' , function ( ) {
1144
1146
it ( 'setPending && unsetPending' , function ( ) {
1145
1147
const state = this . state
1146
- const methods = [ 'find' , 'get' , 'create' , 'update' , 'patch' , 'remove' ]
1148
+ const methods : PendingServiceMethodName [ ] = [
1149
+ 'find' ,
1150
+ 'get' ,
1151
+ 'create' ,
1152
+ 'update' ,
1153
+ 'patch' ,
1154
+ 'remove'
1155
+ ]
1147
1156
1148
1157
methods . forEach ( method => {
1149
1158
const uppercaseMethod = method . charAt ( 0 ) . toUpperCase ( ) + method . slice ( 1 )
@@ -1163,7 +1172,14 @@ describe('Service Module - Mutations', function() {
1163
1172
describe ( 'Errors' , function ( ) {
1164
1173
it ( 'setError' , function ( ) {
1165
1174
const state = this . state
1166
- const methods = [ 'find' , 'get' , 'create' , 'update' , 'patch' , 'remove' ]
1175
+ const methods : PendingServiceMethodName [ ] = [
1176
+ 'find' ,
1177
+ 'get' ,
1178
+ 'create' ,
1179
+ 'update' ,
1180
+ 'patch' ,
1181
+ 'remove'
1182
+ ]
1167
1183
1168
1184
methods . forEach ( method => {
1169
1185
const uppercaseMethod = method . charAt ( 0 ) . toUpperCase ( ) + method . slice ( 1 )
@@ -1176,7 +1192,14 @@ describe('Service Module - Mutations', function() {
1176
1192
1177
1193
it ( 'setError with feathers-errors' , function ( ) {
1178
1194
const state = this . state
1179
- const methods = [ 'find' , 'get' , 'create' , 'update' , 'patch' , 'remove' ]
1195
+ const methods : PendingServiceMethodName [ ] = [
1196
+ 'find' ,
1197
+ 'get' ,
1198
+ 'create' ,
1199
+ 'update' ,
1200
+ 'patch' ,
1201
+ 'remove'
1202
+ ]
1180
1203
1181
1204
methods . forEach ( method => {
1182
1205
const uppercaseMethod = method . charAt ( 0 ) . toUpperCase ( ) + method . slice ( 1 )
@@ -1196,7 +1219,14 @@ describe('Service Module - Mutations', function() {
1196
1219
1197
1220
it ( 'clearError' , function ( ) {
1198
1221
const state = this . state
1199
- const methods = [ 'find' , 'get' , 'create' , 'update' , 'patch' , 'remove' ]
1222
+ const methods : PendingServiceMethodName [ ] = [
1223
+ 'find' ,
1224
+ 'get' ,
1225
+ 'create' ,
1226
+ 'update' ,
1227
+ 'patch' ,
1228
+ 'remove'
1229
+ ]
1200
1230
1201
1231
methods . forEach ( method => {
1202
1232
const uppercaseMethod = method . charAt ( 0 ) . toUpperCase ( ) + method . slice ( 1 )
0 commit comments