Skip to content

Commit a4e2217

Browse files
committed
Fix test case for user_imply _clone function
1 parent 86556a3 commit a4e2217

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/auth/src/core/user/user_impl.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ describe('core/user/user_impl', () => {
275275
}
276276
],
277277
tenantId: 'tenant-id',
278-
createdAt: "2018-01-01 13:02:56.12345678",
279-
lastLoginAt: "2018-01-05 13:02:56.12345678"
278+
createdAt: '2018-01-01 13:02:56.12345678',
279+
lastLoginAt: '2018-01-05 13:02:56.12345678'
280280
});
281281

282282
const newAuth = await testAuth();
@@ -296,8 +296,7 @@ describe('core/user/user_impl', () => {
296296
uid: 'i-am-uid'
297297
}
298298
]);
299-
expect(copy.metadata.creationTime).to.eq("2018-01-01 13:02:56.12345678");
300-
expect(copy.metadata.lastSignInTime).to.eq("2018-01-05 13:02:56.12345678");
299+
expect(copy.metadata.toJSON()).to.eql(user.metadata.toJSON());
301300
});
302301
});
303302
});

packages/auth/src/core/user/user_impl.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,8 @@ export class UserImpl implements UserInternal {
144144
...this,
145145
auth,
146146
stsTokenManager: this.stsTokenManager._clone()
147-
})
148-
149-
newUser.metadata._copy(this.metadata)
150-
147+
});
148+
newUser.metadata._copy(this.metadata);
151149
return newUser;
152150
}
153151

0 commit comments

Comments
 (0)