@@ -40,7 +40,7 @@ describe('auth() method', () => {
4040
4141 it ( 'sets role and userId' , async ( ) => {
4242 const authRole = getRoleName ( 'authenticated' ) ;
43- await db . auth ( { role : authRole , userId : '12345' } ) ;
43+ db . auth ( { role : authRole , userId : '12345' } ) ;
4444
4545 const role = await db . query ( 'SELECT current_setting(\'role\', true) AS role' ) ;
4646 expect ( role . rows [ 0 ] . role ) . toBe ( authRole ) ;
@@ -51,7 +51,7 @@ describe('auth() method', () => {
5151
5252 it ( 'sets role with custom userIdKey' , async ( ) => {
5353 const authRole = getRoleName ( 'authenticated' ) ;
54- await db . auth ( {
54+ db . auth ( {
5555 role : authRole ,
5656 userId : 'custom-123' ,
5757 userIdKey : 'app.user.id'
@@ -66,15 +66,15 @@ describe('auth() method', () => {
6666
6767 it ( 'handles numeric userId' , async ( ) => {
6868 const authRole = getRoleName ( 'authenticated' ) ;
69- await db . auth ( { role : authRole , userId : 99999 } ) ;
69+ db . auth ( { role : authRole , userId : 99999 } ) ;
7070
7171 const userId = await db . query ( 'SELECT current_setting(\'jwt.claims.user_id\', true) AS user_id' ) ;
7272 expect ( userId . rows [ 0 ] . user_id ) . toBe ( '99999' ) ;
7373 } ) ;
7474
7575 it ( 'sets role without userId' , async ( ) => {
7676 const authRole = getRoleName ( 'authenticated' ) ;
77- await db . auth ( { role : authRole } ) ;
77+ db . auth ( { role : authRole } ) ;
7878
7979 const role = await db . query ( 'SELECT current_setting(\'role\', true) AS role' ) ;
8080 expect ( role . rows [ 0 ] . role ) . toBe ( authRole ) ;
@@ -91,7 +91,7 @@ describe('auth() with default role', () => {
9191 } ) ;
9292
9393 it ( 'uses default authenticated role when role not provided' , async ( ) => {
94- await db . auth ( { userId : 'test-user-456' } ) ;
94+ db . auth ( { userId : 'test-user-456' } ) ;
9595
9696 const role = await db . query ( 'SELECT current_setting(\'role\', true) AS role' ) ;
9797 const expectedRole = getRoleName ( 'authenticated' ) ;
@@ -103,7 +103,7 @@ describe('auth() with default role', () => {
103103
104104 it ( 'allows explicit role override' , async ( ) => {
105105 const anonRole = getRoleName ( 'anonymous' ) ;
106- await db . auth ( { userId : 'admin-user-789' , role : anonRole } ) ;
106+ db . auth ( { userId : 'admin-user-789' , role : anonRole } ) ;
107107
108108 const role = await db . query ( 'SELECT current_setting(\'role\', true) AS role' ) ;
109109 expect ( role . rows [ 0 ] . role ) . toBe ( anonRole ) ;
@@ -113,7 +113,7 @@ describe('auth() with default role', () => {
113113 } ) ;
114114
115115 it ( 'handles numeric userId with default role' , async ( ) => {
116- await db . auth ( { userId : 42 } ) ;
116+ db . auth ( { userId : 42 } ) ;
117117
118118 const userId = await db . query ( 'SELECT current_setting(\'jwt.claims.user_id\', true) AS user_id' ) ;
119119 expect ( userId . rows [ 0 ] . user_id ) . toBe ( '42' ) ;
@@ -166,7 +166,7 @@ describe('clearContext() method', () => {
166166 expect ( userIdBefore . rows [ 0 ] . user_id ) . toBe ( 'old-user' ) ;
167167
168168 db . clearContext ( ) ;
169- await db . auth ( { userId : 'new-user' } ) ;
169+ db . auth ( { userId : 'new-user' } ) ;
170170
171171 const userId = await db . query ( 'SELECT current_setting(\'jwt.claims.user_id\', true) AS user_id' ) ;
172172 expect ( userId . rows [ 0 ] . user_id ) . toBe ( 'new-user' ) ;
@@ -200,7 +200,7 @@ describe('publish() method', () => {
200200
201201 it ( 'preserves context after publish' , async ( ) => {
202202 const authRole = getRoleName ( 'authenticated' ) ;
203- await db . auth ( { role : authRole , userId : 'test-999' } ) ;
203+ db . auth ( { role : authRole , userId : 'test-999' } ) ;
204204
205205 await db . publish ( ) ;
206206
0 commit comments