@@ -204,6 +204,19 @@ suite('SQL APIs enabled at build time', () => {
|
204 | 204 | ); |
205 | 205 | }); |
206 | 206 | |
| 207 | +test('percentile is enabled', (t) => { |
| 208 | +const db = new DatabaseSync(':memory:'); |
| 209 | +db.exec(` |
| 210 | + CREATE TABLE t1 (x INTEGER); |
| 211 | + INSERT INTO t1 (x) VALUES (1), (2), (3), (4), (5); |
| 212 | + `); |
| 213 | + |
| 214 | +t.assert.deepStrictEqual( |
| 215 | +db.prepare('SELECT percentile(x, 50) AS p50 FROM t1;').get(), |
| 216 | +{ __proto__: null, p50: 3 }, |
| 217 | +); |
| 218 | +}); |
| 219 | + |
207 | 220 | test('dbstat is enabled', (t) => { |
208 | 221 | const db = new DatabaseSync(nextDb()); |
209 | 222 | t.after(() => { db.close(); }); |
@@ -244,7 +257,7 @@ suite('SQL APIs enabled at build time', () => {
|
244 | 257 | ); |
245 | 258 | }); |
246 | 259 | |
247 | | -test('fts3 parenthesis', (t) => { |
| 260 | +test('fts3 parenthesis is enabled', (t) => { |
248 | 261 | const db = new DatabaseSync(':memory:'); |
249 | 262 | db.exec(` |
250 | 263 | CREATE VIRTUAL TABLE t1 USING fts3(content TEXT); |
|