Skip to content

Commit 3d5b76e

Browse files
committed
test: remove test
1 parent 2d13861 commit 3d5b76e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ function addObjects(db: Db, queryResults: QueryResults): void {
383383
* @returns whether given input are options for the `pgStructure` function.
384384
*/
385385
function isOptions(input?: Client | ClientConfig | string | Options): input is Options {
386+
/* istanbul ignore next */
386387
if (input === undefined) return false;
387388
const optionsAvailable: Required<{ [K in keyof Options]: true }> = {
388389
envPrefix: true,
@@ -439,6 +440,7 @@ export async function pgStructure(client?: Client | ClientConfig | string, optio
439440
export async function pgStructure(options?: Options): Promise<Db>;
440441
export async function pgStructure(clientOrOptions?: Client | ClientConfig | string | Options, maybeOptions: Options = {}): Promise<Db> {
441442
const [maybePgClientOrConfig, options] = isOptions(clientOrOptions) ? [undefined, clientOrOptions] : [clientOrOptions, maybeOptions];
443+
/* istanbul ignore next */
442444
const pgClientOrConfig = maybePgClientOrConfig ?? getEnvValues(options.envPrefix ?? "DB");
443445
const { client, shouldCloseConnection } = await getConnectedPgClient(pgClientOrConfig);
444446

test/pg-structure.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ describe("pgStructure()", () => {
8383
expect(db.tables.get("account").name).toEqual("account");
8484
});
8585

86-
it("should throw if it cannot connect.", async () => {
87-
await expect(pgStructure()).rejects.toThrow();
88-
});
89-
9086
it("should accept options as first argument and reads client config from environment variables.", async () => {
9187
process.env.DBPX_USER = "xyz-user";
9288
process.env.DBPX_PASSWORD = "wrong-password";

0 commit comments

Comments
 (0)