Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reaching 100% coverage (pt 2) #114

Open
nylen opened this issue Jul 10, 2020 · 0 comments
Open

Reaching 100% coverage (pt 2) #114

nylen opened this issue Jul 10, 2020 · 0 comments

Comments

@nylen
Copy link

nylen commented Jul 10, 2020

The only line in the project that is "partially covered" is line 37 in priority-queue.ts:

dequeue(): RunFunction | undefined {
const item = this._queue.shift();
return item?.run;
}

This (and the method definition) seem to say that dequeue may return undefined, but when dequeue is actually used this is not the case (because the queue size is checked earlier in that method):

this._queue.dequeue()!();

I'm not sure the best way to resolve this so created an issue about it instead. Would dequeue ever be expected to return undefined under normal usage? If not, should its result ever be undefined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant