Skip to content

Commit f072d6b

Browse files
committed
Don't specify lastRefreshTime in integration tests
Since specifying this when importing users isn't supported.
1 parent 8bb80c1 commit f072d6b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/integration/auth.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { deepExtend, deepCopy } from '../../src/utils/deep-copy';
3131
import {
3232
AuthProviderConfig, CreateTenantRequest, DeleteUsersResult, PhoneMultiFactorInfo,
3333
TenantAwareAuth, UpdatePhoneMultiFactorInfoRequest, UpdateTenantRequest, UserImportOptions,
34-
UserImportRecord, UserRecord, getAuth,
34+
UserImportRecord, UserMetadata, UserRecord, getAuth,
3535
} from '../../lib/auth/index';
3636

3737
const chalk = require('chalk'); // eslint-disable-line @typescript-eslint/no-var-requires
@@ -2517,7 +2517,8 @@ describe('admin.auth', () => {
25172517
metadata: {
25182518
lastSignInTime: now,
25192519
creationTime: now,
2520-
lastRefreshTime: null, // TODO(rsgowman): Switch to 'now' once importing users supports lastRefreshTime
2520+
// TODO(rsgowman): Enable once importing users supports lastRefreshTime
2521+
//lastRefreshTime: now,
25212522
},
25222523
providerData: [
25232524
{
@@ -2549,6 +2550,11 @@ describe('admin.auth', () => {
25492550
providerId: 'phone',
25502551
phoneNumber: importUserRecord.phoneNumber!,
25512552
});
2553+
// The lastRefreshTime should be set to null
2554+
type Writable<UserMetadata> = {
2555+
-readonly [k in keyof UserMetadata]: UserMetadata[k];
2556+
};
2557+
(importUserRecord.metadata as Writable<UserMetadata>).lastRefreshTime = null;
25522558
const actualUserRecord: {[key: string]: any} = userRecord.toJSON();
25532559
for (const key of Object.keys(importUserRecord)) {
25542560
expect(JSON.stringify(actualUserRecord[key]))

0 commit comments

Comments
 (0)