Skip to content

Commit 93c7f14

Browse files
committed
Update to partially mock Firebase 5
1 parent 8c42be1 commit 93c7f14

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/user.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,11 @@ MockFirebaseUser.prototype.toJSON = function() {
119119
displayName: this.displayName,
120120
photoURL: this.photoURL,
121121
phoneNumber: this.phoneNumber,
122-
disabled: this.disabled,
123-
metadata: this.metadata && this.metadata.toJSON(),
124-
passwordHash: this.passwordHash,
125-
passwordSalt: this.passwordSalt,
126-
customClaims: JSON.parse(JSON.stringify(this.customClaims)),
127-
tokensValidAfterTime: this.tokensValidAfterTime,
128122
};
123+
if (this.metadata) {
124+
json.createdAt = this.metadata.createdAt;
125+
json.lastLoginAt = this.metadata.lastLoginAt;
126+
}
129127
json.providerData = [];
130128
for (const entry of this.providerData) {
131129
json.providerData.push(entry.toJSON());

0 commit comments

Comments
 (0)