Skip to content

Commit

Permalink
fix(index): correct misspelling of received in error string
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Mar 8, 2021
1 parent 54caeda commit f6b7fcb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function parseOptions(acceptedOptions, options) {
invalidArgs.push(
`Invalid value type provided for option '${key}', expected ${
acceptedOptions[key].type
} but recieved ${typeof options[key]}`
} but received ${typeof options[key]}`
);
}
} else {
Expand Down
24 changes: 12 additions & 12 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe("pdfAttach Function", () => {
.pdfAttach(file, undefined, undefined, options)
.catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'replace', expected boolean but recieved string"
"Invalid value type provided for option 'replace', expected boolean but received string"
);
});
});
Expand Down Expand Up @@ -178,7 +178,7 @@ describe("pdfDetach Function", () => {
expect.assertions(1);
await poppler.pdfDetach(file, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'listEmbedded', expected boolean but recieved string"
"Invalid value type provided for option 'listEmbedded', expected boolean but received string"
);
});
});
Expand Down Expand Up @@ -231,7 +231,7 @@ describe("pdfFonts Function", () => {
expect.assertions(1);
await poppler.pdfFonts(file, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToExamine', expected number but recieved string"
"Invalid value type provided for option 'firstPageToExamine', expected number but received string"
);
});
});
Expand Down Expand Up @@ -294,7 +294,7 @@ describe("pdfImages Function", () => {
expect.assertions(1);
await poppler.pdfImages(undefined, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToConvert', expected number but recieved string; Invalid value type provided for option 'lastPageToConvert', expected number but recieved string"
"Invalid value type provided for option 'firstPageToConvert', expected number but received string; Invalid value type provided for option 'lastPageToConvert', expected number but received string"
);
});
});
Expand Down Expand Up @@ -347,7 +347,7 @@ describe("pdfInfo Function", () => {
expect.assertions(1);
await poppler.pdfInfo(file, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToConvert', expected number but recieved string"
"Invalid value type provided for option 'firstPageToConvert', expected number but received string"
);
});
});
Expand Down Expand Up @@ -417,7 +417,7 @@ describe("pdfSeparate Function", () => {
expect.assertions(1);
await poppler.pdfSeparate(file, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToExtract', expected number but recieved string"
"Invalid value type provided for option 'firstPageToExtract', expected number but received string"
);
});
});
Expand Down Expand Up @@ -500,7 +500,7 @@ describe("pdfToCairo Function", () => {
expect.assertions(1);
await poppler.pdfToCairo(file, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'pdfFile', expected boolean but recieved string"
"Invalid value type provided for option 'pdfFile', expected boolean but received string"
);
});
});
Expand Down Expand Up @@ -578,7 +578,7 @@ describe("pdfToHtml Function", () => {
expect.assertions(1);
await poppler.pdfToHtml(file, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToConvert', expected number but recieved string; Invalid value type provided for option 'lastPageToConvert', expected number but recieved string"
"Invalid value type provided for option 'firstPageToConvert', expected number but received string; Invalid value type provided for option 'lastPageToConvert', expected number but received string"
);
});
});
Expand Down Expand Up @@ -651,7 +651,7 @@ describe("pdfToPpm Function", () => {
expect.assertions(1);
await poppler.pdfToPpm(undefined, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToConvert', expected number but recieved string; Invalid value type provided for option 'lastPageToConvert', expected number but recieved string"
"Invalid value type provided for option 'firstPageToConvert', expected number but received string; Invalid value type provided for option 'lastPageToConvert', expected number but received string"
);
});
});
Expand Down Expand Up @@ -733,7 +733,7 @@ describe("pdfToPs Function", () => {
expect.assertions(1);
await poppler.pdfToPs(file, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToConvert', expected number but recieved string; Invalid value type provided for option 'lastPageToConvert', expected number but recieved string"
"Invalid value type provided for option 'firstPageToConvert', expected number but received string; Invalid value type provided for option 'lastPageToConvert', expected number but received string"
);
});
});
Expand Down Expand Up @@ -814,7 +814,7 @@ describe("pdfToText Function", () => {
expect.assertions(1);
await poppler.pdfToText(file, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'firstPageToConvert', expected number but recieved string; Invalid value type provided for option 'lastPageToConvert', expected number but recieved string"
"Invalid value type provided for option 'firstPageToConvert', expected number but received string; Invalid value type provided for option 'lastPageToConvert', expected number but received string"
);
});
});
Expand Down Expand Up @@ -879,7 +879,7 @@ describe("pdfUnite Function", () => {
expect.assertions(1);
await poppler.pdfUnite(files, undefined, options).catch((err) => {
expect(err.message).toEqual(
"Invalid value type provided for option 'printVersionInfo', expected boolean but recieved string"
"Invalid value type provided for option 'printVersionInfo', expected boolean but received string"
);
});
});
Expand Down

0 comments on commit f6b7fcb

Please sign in to comment.