Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alkatrivedi committed Apr 16, 2024
1 parent a063abd commit 3c46110
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 4 additions & 6 deletions system-test/spanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8901,15 +8901,13 @@ describe('Spanner', () => {
try {
const [rows] = await transaction!.run('SELECT * FROM TxnTable');
assert.strictEqual(rows.length, googleSqlRecords.length);
}
catch (err) {
} catch (err) {
if ((err as grpc.ServiceError).code === grpc.status.ABORTED) {
assert.ok(err, "Transaction is aborted");
assert.ok(err, 'Transaction is aborted');
} else {
console.log("ERROR: ", err);
console.log('ERROR: ', err);
}
}
finally{
} finally {
transaction.end();
}
});
Expand Down
8 changes: 6 additions & 2 deletions test/spanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3288,7 +3288,10 @@ describe('Spanner with mock server', () => {

it('should use optimistic lock and transaction tag for getTransaction', async () => {
const database = newTestDatabase();
const promise = await database.getTransaction({optimisticLock: true, requestOptions: {transactionTag: 'transaction-tag'}});
const promise = await database.getTransaction({
optimisticLock: true,
requestOptions: {transactionTag: 'transaction-tag'},
});
const transaction = promise[0];
await transaction.run('SELECT 1').then(results => {

Check warning on line 3296 in test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

'results' is defined but never used
const request = spannerMock.getRequests().find(val => {
Expand All @@ -3300,7 +3303,8 @@ describe('Spanner with mock server', () => {
'OPTIMISTIC'
);
assert.strictEqual(
request.requestOptions?.transactionTag, 'transaction-tag'
request.requestOptions?.transactionTag,
'transaction-tag'
);
});
});
Expand Down

0 comments on commit 3c46110

Please sign in to comment.