(id, password)
| 363 | } |
| 364 | |
| 365 | function mockCustomAuthenticator(id, password) { |
| 366 | const custom = {}; |
| 367 | custom.validateAuthData = function (authData) { |
| 368 | if (authData.id === id && authData.password.startsWith(password)) { |
| 369 | return Promise.resolve(); |
| 370 | } |
| 371 | throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'not validated'); |
| 372 | }; |
| 373 | custom.validateAppId = function () { |
| 374 | return Promise.resolve(); |
| 375 | }; |
| 376 | return custom; |
| 377 | } |
| 378 | |
| 379 | function mockCustom() { |
| 380 | return mockCustomAuthenticator('fastrde', 'password'); |
no outgoing calls
no test coverage detected
searching dependent graphs…