Skip to content

Commit

Permalink
chore(moduleExec): test for undefined queryOpts (#24, #27)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Feb 9, 2021
1 parent 766aa4f commit 8017659
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/moduleExec.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ describe('moduleExec', () => {
await expect(rwo({ invalid: true })).rejects.toThrow(InvalidOptionsError)
});

it('accepts empty queryOptions', async () => {
await expect(
yf.search('AAPL', undefined, { devel: 'search-AAPL.json' })
).resolves.toBeDefined();
});

it('logs errors on invalid options when logOptionsErrors = true', async () => {
yf._opts.validation.logOptionsErrors = true;
const realConsole = console;
Expand Down

0 comments on commit 8017659

Please sign in to comment.