Skip to content

Commit

Permalink
test(index): tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Mar 12, 2024
1 parent a7319f6 commit 1960f47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ class Poppler {
* if a local installation is not found.
*/
constructor(binPath) {
this.popplerPath = "";

/* istanbul ignore else: requires specific OS */
if (binPath) {
/** @type {string|undefined} */
this.popplerPath = binPath;
} else {
const { platform } = process;
Expand Down
9 changes: 0 additions & 9 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ describe("Node-Poppler module", () => {
});
});

it("Creates a new Poppler instance without the binary path set on win32", () => {
Object.defineProperty(process, "platform", {
value: "win32",
});

const poppler = new Poppler();
expect(poppler.popplerPath).toBe(windowsPath);
});

/**
* @todo Fix this test, mocking of "node:" scheme not supported yet.
* @see {@link https://github.com/jestjs/jest/pull/14297 | Jest PR #14297}
Expand Down

0 comments on commit 1960f47

Please sign in to comment.