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 e582f5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/next-drupal/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
preset: "ts-jest/presets/default-esm",
extensionsToTreatAsEsm: [".ts"],
testEnvironment: "node",
setupFiles: ["dotenv/config"],
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
Expand All @@ -10,6 +11,7 @@ module.exports = {
"ts-jest",
{
isolatedModules: true,
useESM: true,
},
],
},
Expand Down
4 changes: 3 additions & 1 deletion packages/next-drupal/src/next-drupal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,9 @@ export class NextDrupal extends NextDrupalBase {
}

deserialize(body, options?) {
if (!body) return null
if (!body) {
return null
}

return this.deserializer(body, options)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("baseUrl parameter", () => {
process.env = env
})

test("throws error given an invalid baseUrl", () => {
test("throws error given an invalid baseUrl", async () => {
expect(
() =>
// @ts-expect-error
Expand Down

0 comments on commit e582f5b

Please sign in to comment.