Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions test/integration/boolean.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Firebolt } from "../../src/index";

const connectionParams = {
auth: {
username: process.env.FIREBOLT_USERNAME as string,
password: process.env.FIREBOLT_PASSWORD as string
},
database: process.env.FIREBOLT_DATABASE as string,
engineName: process.env.FIREBOLT_ENGINE_NAME as string
};

jest.setTimeout(100000);

describe("boolean", () => {
it("handles select boolean", async () => {
const firebolt = Firebolt({
apiEndpoint: process.env.FIREBOLT_API_ENDPOINT as string
});

const connection = await firebolt.connect(connectionParams);

const statement = await connection.execute("select true::boolean", {
settings: {
advanced_mode: "true",
bool_output_format: "postgres",
output_format_firebolt_type_names: "true"
}
});

const { data, meta } = await statement.fetchResult();
expect(meta[0].type).toEqual("boolean");
const row = data[0];
expect((row as unknown[])[0]).toEqual(true);
});
});