Skip to content

Commit

Permalink
Improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Nov 2, 2023
1 parent b3f84c1 commit aab3608
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/base/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

import { describe, expect, it } from '@jest/globals';
import { ExasolExtension, NotFoundError } from '../api';
import { convertBaseExtension } from './index';
import { emptyBaseExtension } from './test-utils';


describe("index", () => {
function testee(): ExasolExtension {
const baseExtension = emptyBaseExtension()
baseExtension.name = "test-ext"
baseExtension.version = "v1"
return convertBaseExtension(baseExtension)
}

describe("findInstances()", () => {
it("is not supported", () => {
expect(() => testee().findInstances(undefined, undefined)).toThrowError(new NotFoundError("Finding instances not supported"))
})
})

describe("addInstance()", () => {
it("is not supported", () => {
expect(() => testee().addInstance(undefined, undefined, undefined)).toThrowError(new NotFoundError("Creating instances not supported"))
})
})

describe("deleteInstance()", () => {
it("is not supported", () => {
expect(() => testee().deleteInstance(undefined, undefined, undefined)).toThrowError(new NotFoundError("Deleting instances not supported"))
})
})

describe("getInstanceParameters()", () => {
it("is not supported", () => {
expect(() => testee().getInstanceParameters(undefined, undefined)).toThrowError(new NotFoundError("Creating instances not supported"))
})
})

describe("readInstanceParameterValues()", () => {
it("is not supported", () => {
expect(() => testee().readInstanceParameterValues(undefined, undefined, undefined)).toThrowError(new NotFoundError("Reading instance parameter values not supported"))
})
})
})

0 comments on commit aab3608

Please sign in to comment.