Skip to content

Commit 5cc943a

Browse files
committed
[SEA-NodeJS] prettier-format SEA test files (CI code-style)
The CI "Check code style" step runs `prettier . --check` (whole repo), not just eslint; these SEA test files were committed without prettier formatting and failed it. Formatting-only; no behavioural change. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent 45f865d commit 5cc943a

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

tests/unit/sea/execution.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ describe('SeaSessionBackend', () => {
423423
const connection = new FakeNativeConnection();
424424
const session = makeSession(connection);
425425
await session.executeStatement('SELECT :x', { namedParameters: { x: 7 } });
426-
const options = connection.lastOptions as { namedParams?: Array<{ name: string; sqlType: string; value?: string }> };
426+
const options = connection.lastOptions as {
427+
namedParams?: Array<{ name: string; sqlType: string; value?: string }>;
428+
};
427429
expect(options.namedParams).to.have.length(1);
428430
expect(options.namedParams?.[0]).to.deep.equal({ name: 'x', sqlType: 'INTEGER', value: '7' });
429431
});
@@ -527,7 +529,10 @@ describe('SeaSessionBackend', () => {
527529
it('getPrimaryKeys rejects an omitted catalog up front (the kernel requires one)', async () => {
528530
const connection = new FakeNativeConnection();
529531
const session = makeSession(connection);
530-
for (const request of [{ schemaName: 'def', tableName: 't' }, { catalogName: '', schemaName: 'def', tableName: 't' }]) {
532+
for (const request of [
533+
{ schemaName: 'def', tableName: 't' },
534+
{ catalogName: '', schemaName: 'def', tableName: 't' },
535+
]) {
531536
let thrown: unknown;
532537
try {
533538
// eslint-disable-next-line no-await-in-loop

tests/unit/sea/inputValidation.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ describe('SeaInputValidation.assertBindableValue', () => {
2727
expect(() => assertBindableValue(null, 'p')).to.not.throw();
2828
expect(() => assertBindableValue(new Date(), 'p')).to.not.throw();
2929
expect(() => assertBindableValue(new Int64(5), 'p')).to.not.throw();
30-
expect(() => assertBindableValue(new DBSQLParameter({ type: DBSQLParameterType.INTEGER, value: 1 }), 'p')).to.not.throw();
30+
expect(() =>
31+
assertBindableValue(new DBSQLParameter({ type: DBSQLParameterType.INTEGER, value: 1 }), 'p'),
32+
).to.not.throw();
3133
});
3234

3335
it('rejects arrays (compound types)', () => {

tests/unit/sea/serverInfo.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
// limitations under the License.
1414

1515
import { expect } from 'chai';
16-
import {
17-
seaServerInfoValue,
18-
SEA_DBMS_NAME,
19-
SEA_SERVER_NAME,
20-
SEA_DBMS_VERSION,
21-
} from '../../../lib/sea/SeaServerInfo';
16+
import { seaServerInfoValue, SEA_DBMS_NAME, SEA_SERVER_NAME, SEA_DBMS_VERSION } from '../../../lib/sea/SeaServerInfo';
2217
import { TGetInfoType } from '../../../thrift/TCLIService_types';
2318

2419
describe('SeaServerInfo.seaServerInfoValue', () => {

0 commit comments

Comments
 (0)