mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-22 12:41:31 +10:00
Delete Account unit tests: added tests related to Google reauthentication
This commit is contained in:
23
__mocks__/gatsby-plugin-firebase/auth/authProvider.js
Normal file
23
__mocks__/gatsby-plugin-firebase/auth/authProvider.js
Normal file
@ -0,0 +1,23 @@
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
class AuthProvider {
|
||||
/**
|
||||
* Creates a new auth provider.
|
||||
*
|
||||
* @param {string} providerId Provider ID.
|
||||
*/
|
||||
constructor(providerId) {
|
||||
if (!providerId) {
|
||||
throw new Error('providerId must be provided.');
|
||||
} else if (typeof providerId !== 'string') {
|
||||
throw new Error('providerId should be a string.');
|
||||
} else {
|
||||
this._providerId = providerId;
|
||||
}
|
||||
}
|
||||
|
||||
get providerId() {
|
||||
return this._providerId;
|
||||
}
|
||||
}
|
||||
|
||||
export default AuthProvider;
|
||||
Reference in New Issue
Block a user