Skip to content

Instantly share code, notes, and snippets.

View asn007's full-sized avatar
🐛
< catching those

Andrey Sinitsyn asn007

🐛
< catching those
  • Nizhny Novgorod, Russia
View GitHub Profile
class QueryBuilderMock {
static forClass() {
return new this()
}
modelClass = () => ({ tableName: 'model_mock' })
_mergeContext = jest.fn().mockReturnThis()
_patch = jest.fn().mockReturnThis()
_delete = jest.fn().mockReturnThis()
_where = jest.fn().mockReturnThis()
const appReducer = combineReducers({
// твои редьюсеры
});
const rootReducer = (state, action) => {
if(action == 'LOGOUT_USER')
state = undefined
return appReducer(state, action);
}

Keybase proof

I hereby claim:

  • I am asn007 on github.
  • I am asn007 (https://keybase.io/asn007) on keybase.
  • I have a public key whose fingerprint is 0FF5 5180 7230 00C9 DDDF 872B F33A A37B BA40 CF62

To claim this, I am signing this object: