Skip to content

Reaching 100% coverage (pt 2) #114

Open
@nylen

Description

@nylen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions