Skip to content

Commit 023c96e

Browse files
Removed error on batch parameter.
1 parent 6243a61 commit 023c96e

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

src/faxes/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,12 @@ module.exports = class {
6767
// eslint-disable-next-line consistent-return
6868
return new Promise((resolve, reject) => {
6969
const formData = {};
70-
let unsupportedParam;
7170

7271
Object.keys(options).forEach((rec) => {
73-
if (rec === 'batch') unsupportedParam = 'batch';
7472
if (options[rec] !== null) formData[rec] = options[rec];
7573
if (typeof formData[rec] === 'boolean') formData[rec] = formData[rec].toString();
7674
});
7775

78-
if (unsupportedParam) return reject(new Error(`Unsupported option: ${unsupportedParam}`));
79-
8076
const req = {
8177
method: 'POST',
8278
url: `${this.url}/faxes`,

test/faxes/index.test.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,6 @@ describe('class: Faxes', () => {
153153
.catch((err) => { throw err; });
154154
});
155155

156-
it('should throw an error when passed the `batch` option parameter', () => {
157-
return faxes.create({
158-
to: process.env.PHONE_NUMBER,
159-
content_url: 'https://google.com',
160-
batch: true,
161-
batch_delay: 2,
162-
})
163-
.catch((err) => {
164-
expect(err).to.be.an(Error);
165-
});
166-
});
167-
168156
// eslint-disable-next-line func-names
169157
it('should be able to support batched sending of `content_url`s and `file`s', function () {
170158
this.timeout(5000);

0 commit comments

Comments
 (0)