(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestJSONEach(t *testing.T) { |
| 10 | result := dbutils.JSONEach("a.b") |
| 11 | |
| 12 | expected := "json_each(CASE WHEN iif(json_valid([[a.b]]), json_type([[a.b]])='array', FALSE) THEN [[a.b]] ELSE json_array([[a.b]]) END)" |
| 13 | |
| 14 | if result != expected { |
| 15 | t.Fatalf("Expected\n%v\ngot\n%v", expected, result) |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | func TestJSONArrayLength(t *testing.T) { |
| 20 | result := dbutils.JSONArrayLength("a.b") |
nothing calls this directly
no test coverage detected
searching dependent graphs…