Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix test ordering leak #120

Closed
wants to merge 1 commit into from
Closed
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
34 changes: 17 additions & 17 deletions test/integration/v2/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@ describe("integration test", () => {
expect(data.length).toEqual(1);
expect(meta.length).toEqual(1);
});
it("show helpful error message on account not found", async () => {
const firebolt = Firebolt({
apiEndpoint: process.env.FIREBOLT_API_ENDPOINT as string
});

await expect(async () => {
await firebolt.testConnection({
auth: {
client_id: process.env.FIREBOLT_CLIENT_ID as string,
client_secret: process.env.FIREBOLT_CLIENT_SECRET as string
},
account: "invalid_account",
database: process.env.FIREBOLT_DATABASE as string,
engineName: process.env.FIREBOLT_ENGINE_NAME as string
});
}).rejects.toThrow(AccountNotFoundError);
});
it("json output format", async () => {
const firebolt = Firebolt({
apiEndpoint: process.env.FIREBOLT_API_ENDPOINT as string
Expand Down Expand Up @@ -316,21 +333,4 @@ describe("integration test", () => {

data.pipe(process.stdout);
});
it("show helpful error message on account not found", async () => {
const firebolt = Firebolt({
apiEndpoint: process.env.FIREBOLT_API_ENDPOINT as string
});

await expect(async () => {
await firebolt.testConnection({
auth: {
client_id: process.env.FIREBOLT_CLIENT_ID as string,
client_secret: process.env.FIREBOLT_CLIENT_SECRET as string
},
account: "invalid_account",
database: process.env.FIREBOLT_DATABASE as string,
engineName: process.env.FIREBOLT_ENGINE_NAME as string
});
}).rejects.toThrow(AccountNotFoundError);
});
});
Loading