File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ import { app } from './utils'
33
44test ( 'list column privileges' , async ( ) => {
55 const res = await app . inject ( { method : 'GET' , path : '/column-privileges' } )
6- expect (
7- res
8- . json < PostgresColumnPrivileges [ ] > ( )
9- . find (
10- ( { relation_schema, relation_name, column_name } ) =>
11- relation_schema === 'public' && relation_name === 'todos' && column_name === 'id'
12- )
13- ) . toMatchInlineSnapshot (
6+ const column = res
7+ . json < PostgresColumnPrivileges [ ] > ( )
8+ . find (
9+ ( { relation_schema, relation_name, column_name } ) =>
10+ relation_schema === 'public' && relation_name === 'todos' && column_name === 'id'
11+ ) !
12+ // We don't guarantee order of privileges, but we want to keep the snapshots consistent.
13+ column . privileges . sort ( ( a , b ) => JSON . stringify ( a ) . localeCompare ( JSON . stringify ( b ) ) )
14+ expect ( column ) . toMatchInlineSnapshot (
1415 { column_id : expect . stringMatching ( / ^ \d + \. \d + $ / ) } ,
1516 `
1617 {
You can’t perform that action at this time.
0 commit comments