File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 66 "scripts" : {
77 "standard" : " standard" ,
88 "test" : " npm run standard && npm run mocha" ,
9- "mocha" : " nyc mocha --exit --timeout=20000 test/**/*.js " ,
9+ "mocha" : " nyc mocha" ,
1010 "preversion" : " npm test" ,
1111 "postversion" : " git push --follow-tags"
1212 },
Original file line number Diff line number Diff line change 1+ --exit
2+ --recursive
3+ --timeout 20000
Original file line number Diff line number Diff line change @@ -213,25 +213,20 @@ describe('UserStore', () => {
213213 } )
214214 } )
215215
216- /* describe('deleteUser', () => {
216+ describe ( 'deleteUser' , ( ) => {
217217 let store
218218
219219 beforeEach ( ( ) => {
220220 store = UserStore . from ( { path : './db' } )
221221 } )
222222
223- it('should look up, delete and look up again a user record by normalized user id', () => {
223+ it ( 'should call backend.del with normalized user id' , ( ) => {
224224 let userId = 'alice.solidtest.space/profile/card#me'
225- let user = {}
226- let founduser = store.findUser(userId)
227225
228- console.log(founduser.id)
229- store.backend.del = sinon.stub().resolves(user)
226+ store . backend . del = sinon . stub ( )
230227
231- return store.deleteUser(founduser)
232- .then(() => {
233- expect(store.findUser(userId).to.be.false)
234- })
228+ return store . deleteUser ( { id : userId } )
229+ . then ( ( ) => expect ( store . backend . del ) . to . have . been . calledWith ( 'users' , UserStore . normalizeIdKey ( userId ) ) )
235230 } )
236- }) */
231+ } )
237232} )
You can’t perform that action at this time.
0 commit comments