Skip to content

Commit

Permalink
Comment out libsql tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Feb 27, 2025
1 parent c63adc8 commit 25f6b11
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions example/src/tests/queries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Chance from 'chance';
import {
isLibsql,
open,
openRemote,
// openRemote,
// openSync,
type DB,
type SQLBatchTuple,
Expand Down Expand Up @@ -38,37 +38,37 @@ export function queriesTests() {
db = null;
}
});
if (isLibsql()) {
itOnly('Remote open a turso database', async () => {
const remoteDb = openRemote({
url: 'libsql://foo-ospfranco.turso.io',
authToken:
'eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJhIjoicnciLCJpYXQiOjE3MTY5NTc5OTUsImlkIjoiZmJkNzZmMjYtZTliYy00MGJiLTlmYmYtMDczZjFmMjdjOGY4In0.U3cAWBOvcdiqoPN3MB81sco7x8CGOjjtZ1ZEf30uo2iPcAmOuJzcnAznmDlZ6SpQd4qzuJxE4mAIoRlOkpzgBQ',
});

console.log('Running select 1');
const res = await remoteDb.execute('SELECT 1');
console.log('after select 1;');

expect(res.rowsAffected).to.equal(0);
});

// it('Open a libsql database replicated to turso', async () => {
// const remoteDb = openSync({
// url: 'libsql://foo-ospfranco.turso.io',
// authToken:
// 'eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJhIjoicnciLCJpYXQiOjE3MTY5NTc5OTUsImlkIjoiZmJkNzZmMjYtZTliYy00MGJiLTlmYmYtMDczZjFmMjdjOGY4In0.U3cAWBOvcdiqoPN3MB81sco7x8CGOjjtZ1ZEf30uo2iPcAmOuJzcnAznmDlZ6SpQd4qzuJxE4mAIoRlOkpzgBQ',
// name: 'my replica',
// syncInterval: 1000,
// });

// const res = await remoteDb.execute('SELECT 1');

// remoteDb.sync();

// expect(res.rowsAffected).to.equal(0);
// });
}
// if (isLibsql()) {
// itOnly('Remote open a turso database', async () => {
// const remoteDb = openRemote({
// url: 'libsql://foo-ospfranco.turso.io',
// authToken:
// 'eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJhIjoicnciLCJpYXQiOjE3MTY5NTc5OTUsImlkIjoiZmJkNzZmMjYtZTliYy00MGJiLTlmYmYtMDczZjFmMjdjOGY4In0.U3cAWBOvcdiqoPN3MB81sco7x8CGOjjtZ1ZEf30uo2iPcAmOuJzcnAznmDlZ6SpQd4qzuJxE4mAIoRlOkpzgBQ',
// });

// console.log('Running select 1');
// const res = await remoteDb.execute('SELECT 1');
// console.log('after select 1;');

// expect(res.rowsAffected).to.equal(0);
// });

// // it('Open a libsql database replicated to turso', async () => {
// // const remoteDb = openSync({
// // url: 'libsql://foo-ospfranco.turso.io',
// // authToken:
// // 'eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJhIjoicnciLCJpYXQiOjE3MTY5NTc5OTUsImlkIjoiZmJkNzZmMjYtZTliYy00MGJiLTlmYmYtMDczZjFmMjdjOGY4In0.U3cAWBOvcdiqoPN3MB81sco7x8CGOjjtZ1ZEf30uo2iPcAmOuJzcnAznmDlZ6SpQd4qzuJxE4mAIoRlOkpzgBQ',
// // name: 'my replica',
// // syncInterval: 1000,
// // });

// // const res = await remoteDb.execute('SELECT 1');

// // remoteDb.sync();

// // expect(res.rowsAffected).to.equal(0);
// // });
// }

it('Can create multiple connections to same db', async () => {
const db2 = open({
Expand Down

0 comments on commit 25f6b11

Please sign in to comment.