()
| 3 | import { sql } from "@/lib/sql" |
| 4 | |
| 5 | export function getProducts() { |
| 6 | const products = sql().select("*").from("products") |
| 7 | |
| 8 | if (canViewFeature("TEST_NEW_PRODUCTS_QUERY", getUser())) { |
| 9 | const altProducts = sql().query.products.findMany() |
| 10 | |
| 11 | console.assert( |
| 12 | products.length === altProducts.length && |
| 13 | products.every(product => { |
| 14 | return altProducts.find(alt => alt.id === product.id) |
| 15 | }) |
| 16 | ) |
| 17 | } |
| 18 | |
| 19 | return products |
| 20 | } |
nothing calls this directly
no test coverage detected