Skip to content

Commit

Permalink
testing code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Apr 15, 2024
1 parent 34f0208 commit 203f43b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions packages/next-drupal/tests/NextDrupalBase/constructor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ describe("baseUrl parameter", () => {
process.env = env
})

test("throws error given an invalid baseUrl", () => {
expect(
() =>
// @ts-expect-error
new NextDrupalBase()
).toThrow("The 'baseUrl' param is required.")

expect(
() =>
// @ts-expect-error
new NextDrupalBase({})
).toThrow("The 'baseUrl' param is required.")
test("throws error given an invalid baseUrl", async () => {
expect.assertions(2)

try {
// @ts-expect-error
new NextDrupalBase()
} catch (error) {
expect(error.message).toBe("The 'baseUrl' param is required.")
}

expect(() => {
// @ts-expect-error
new NextDrupalBase({})
}).toThrow("The 'baseUrl' param is required.")
})

test("announces debug mode when turned on", () => {
Expand Down

0 comments on commit 203f43b

Please sign in to comment.