( path: string, direction: `asc` | `desc`, )
| 6 | |
| 7 | // Helper to create an OrderByClause for testing |
| 8 | function createOrderByClause( |
| 9 | path: string, |
| 10 | direction: `asc` | `desc`, |
| 11 | ): OrderByClause { |
| 12 | const compareOptions: CompareOptions = { |
| 13 | direction, |
| 14 | nulls: direction === `asc` ? `first` : `last`, |
| 15 | } |
| 16 | return { |
| 17 | expression: new PropRef([`t`, path]), |
| 18 | compareOptions, |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | // Helper to check if a Func has the expected structure |
| 23 | function isFuncWithName(expr: unknown, name: string): expr is Func { |