Skip to content

Commit 482696d

Browse files
committed
Comment out test
1 parent 82d72f4 commit 482696d

File tree

4 files changed

+835
-50
lines changed

4 files changed

+835
-50
lines changed

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
"porter"
5959
]
6060
}
61-
}
61+
}

example/src/tests/queries.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
describe,
1515
it,
1616
} from '@op-engineering/op-test';
17-
import pkg from '../../package.json'
17+
// import pkg from '../../package.json'
1818

1919
describe('Queries tests', () => {
2020
let db: DB;
@@ -778,48 +778,48 @@ describe('Queries tests', () => {
778778
});
779779

780780

781-
const sqliteVecEnabled = pkg?.['op-sqlite']?.sqliteVec === true;
782-
if (sqliteVecEnabled) {
783-
it('sqlite-vec extension: vector similarity search', async () => {
784-
// Create a virtual table for storing vectors
785-
await db.execute(`
786-
CREATE VIRTUAL TABLE vec_items USING vec0(
787-
embedding FLOAT[8]
788-
)
789-
`);
781+
// const sqliteVecEnabled = pkg?.['op-sqlite']?.sqliteVec === true;
782+
// if (sqliteVecEnabled) {
783+
// it('sqlite-vec extension: vector similarity search', async () => {
784+
// // Create a virtual table for storing vectors
785+
// await db.execute(`
786+
// CREATE VIRTUAL TABLE vec_items USING vec0(
787+
// embedding FLOAT[8]
788+
// )
789+
// `);
790790

791-
// Insert some sample vectors
792-
await db.execute(`
793-
INSERT INTO vec_items(rowid, embedding)
794-
VALUES
795-
(1, '[-0.200, 0.250, 0.341, -0.211, 0.645, 0.935, -0.316, -0.924]'),
796-
(2, '[0.443, -0.501, 0.355, -0.771, 0.707, -0.708, -0.185, 0.362]'),
797-
(3, '[0.716, -0.927, 0.134, 0.052, -0.669, 0.793, -0.634, -0.162]'),
798-
(4, '[-0.710, 0.330, 0.656, 0.041, -0.990, 0.726, 0.385, -0.958]')
799-
`);
791+
// // Insert some sample vectors
792+
// await db.execute(`
793+
// INSERT INTO vec_items(rowid, embedding)
794+
// VALUES
795+
// (1, '[-0.200, 0.250, 0.341, -0.211, 0.645, 0.935, -0.316, -0.924]'),
796+
// (2, '[0.443, -0.501, 0.355, -0.771, 0.707, -0.708, -0.185, 0.362]'),
797+
// (3, '[0.716, -0.927, 0.134, 0.052, -0.669, 0.793, -0.634, -0.162]'),
798+
// (4, '[-0.710, 0.330, 0.656, 0.041, -0.990, 0.726, 0.385, -0.958]')
799+
// `);
800800

801-
// Perform KNN query to find the 2 nearest neighbors
802-
const queryVector = '[0.890, 0.544, 0.825, 0.961, 0.358, 0.0196, 0.521, 0.175]';
803-
const result = await db.execute(`
804-
SELECT rowid, distance
805-
FROM vec_items
806-
WHERE embedding MATCH ?
807-
ORDER BY distance
808-
LIMIT 2
809-
`, [queryVector]);
801+
// // Perform KNN query to find the 2 nearest neighbors
802+
// const queryVector = '[0.890, 0.544, 0.825, 0.961, 0.358, 0.0196, 0.521, 0.175]';
803+
// const result = await db.execute(`
804+
// SELECT rowid, distance
805+
// FROM vec_items
806+
// WHERE embedding MATCH ?
807+
// ORDER BY distance
808+
// LIMIT 2
809+
// `, [queryVector]);
810810

811-
// Verify results
812-
expect(result.rows.length).toEqual(2);
813-
expect(result.rows[0]!.rowid).toEqual(2);
814-
expect(result.rows[1]!.rowid).toEqual(1);
811+
// // Verify results
812+
// expect(result.rows.length).toEqual(2);
813+
// expect(result.rows[0]!.rowid).toEqual(2);
814+
// expect(result.rows[1]!.rowid).toEqual(1);
815815

816-
// Verify distances are positive numbers
817-
const distance0 = result.rows[0]!.distance as number;
818-
const distance1 = result.rows[1]!.distance as number;
819-
expect(typeof distance0).toEqual('number');
820-
expect(distance0 > 0).toBeTruthy();
821-
expect(distance1 > 0).toBeTruthy();
822-
});
823-
}
816+
// // Verify distances are positive numbers
817+
// const distance0 = result.rows[0]!.distance as number;
818+
// const distance1 = result.rows[1]!.distance as number;
819+
// expect(typeof distance0).toEqual('number');
820+
// expect(distance0 > 0).toBeTruthy();
821+
// expect(distance1 > 0).toBeTruthy();
822+
// });
823+
// }
824824

825825
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"registry": "https://registry.npmjs.org/"
5959
},
6060
"devDependencies": {
61+
"biome": "^0.3.3",
6162
"clang-format": "^1.8.0",
6263
"react": "19.1.1",
6364
"react-native": "0.82.1",

0 commit comments

Comments
 (0)