File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,7 @@ function getPayload({
120120 * overwhelming majority of cases.
121121 */
122122function tryDetectEnvironment ( ) : void {
123- if (
124- typeof navigator !== "undefined" &&
125- Object . hasOwn ( navigator , "userAgent" )
126- ) {
123+ if ( typeof navigator !== "undefined" && "userAgent" in navigator ) {
127124 const { userAgent } = navigator ;
128125
129126 if (
Original file line number Diff line number Diff line change @@ -294,11 +294,13 @@ describe.each([{ permission: "Admin" }])(
294294 ) . rejects . toHaveProperty ( "cause.code" , "invalid_api_key" ) ;
295295 } ) ;
296296
297- test ( `${ permission } key: Creates tenant token with an expiration date in the past throws an error` , async ( ) => {
297+ test ( `${ permission } key: Creates tenant token with an expiration date as UNIX timestamp in the past throws an error` , async ( ) => {
298298 const client = await getClient ( permission ) ;
299299 const apiKey = await getKey ( permission ) ;
300300 const { uid } = await client . getKey ( apiKey ) ;
301- const date = new Date ( "December 17, 2000 03:24:00" ) ;
301+ const date = Math . floor (
302+ new Date ( "December 17, 2000 03:24:00" ) . getTime ( ) / 1000 ,
303+ ) ;
302304
303305 const token = await generateTenantToken ( {
304306 apiKey,
You can’t perform that action at this time.
0 commit comments