Skip to content

Commit 1290128

Browse files
committed
test: ensure instance getters exist on BaseModel class
1 parent 4cd4a83 commit 1290128

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/service-module/model-base.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,21 @@ describe('makeModel / BaseModel', function () {
113113
`has ${method} method`
114114
)
115115
})
116+
117+
const getterMethods = [
118+
'isCreatePending',
119+
'isUpdatePending',
120+
'isPatchPending',
121+
'isRemovePending',
122+
'isPending'
123+
]
124+
const m = new BaseModel()
125+
getterMethods.forEach(method => {
126+
assert(
127+
typeof Object.getOwnPropertyDescriptor(Object.getPrototypeOf(m), method).get === 'function',
128+
`has ${method} getter`
129+
)
130+
})
116131
})
117132

118133
it('allows customization through the FeathersVuexOptions', function () {

0 commit comments

Comments
 (0)