Skip to content

Commit

Permalink
Fixed return for custom params method. (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredjophy authored Oct 14, 2024
1 parent 38deb07 commit 0206203
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/__tests__/CustomParam.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ test('Custom parameters', () => {
api.addCustomParam({ foo: { bar: 'baz' } });
api.addCustomParam({ bar: ['a', 'b', 'c'] });
expect(api.getQueryString({ encode: false })).toBe('foo[bar]=baz&bar[0]=a&bar[1]=b&bar[2]=c');
api.clear();
expect(api.getQueryString()).toBe('');
expect(api.addCustomParam({ foo: 'bar' })).toBeInstanceOf(DrupalJsonApiParams)
});

test("Nova's Ark with custom params", () => {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class DrupalJsonApiParams implements DrupalJsonApiParamsInterface {
...this.data,
...input,
};
return this;
}

/**
Expand Down

0 comments on commit 0206203

Please sign in to comment.