Skip to content

Commit

Permalink
test: unblocked from upstream node issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Benricheson101 committed Apr 15, 2024
1 parent 3c23493 commit bf76259
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lib/struct/bufferedQueue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ describe('struct/BufferedQueue', async () => {
deepStrictEqual(eqT, ['info']);
});

// blocked by https://github.com/nodejs/node/pull/52332
it('dispatches each topic to a handler fn', {skip: true}, t => {
it('dispatches each topic to a handler fn', t => {
t.mock.timers.enable();

const mockHandleFn = t.mock.fn();
Expand Down Expand Up @@ -57,8 +56,7 @@ describe('struct/BufferedQueue', async () => {
deepStrictEqual(infoQ, ['info', 3]);
});

// blocked by https://github.com/nodejs/node/pull/52332
it('splits dispatches by timeout', {skip: true}, t => {
it('splits dispatches by timeout', t => {
t.mock.timers.enable({apis: ['setTimeout']});

const fn = t.mock.fn();
Expand Down
4 changes: 2 additions & 2 deletions lib/struct/bufferedQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defer} from '..';

export interface BufferedData<Data, Topic> {
buffer: Data[];
timeout: NodeJS.Timeout;
timeout?: NodeJS.Timeout;
promise: Promise<[Topic, unknown]>;
resolve: (t: [Topic, unknown]) => void;
}
Expand Down Expand Up @@ -53,7 +53,7 @@ export class BufferedQueue<Data, Topic = string> {

stored = {
buffer: [],
timeout: undefined!,
timeout: undefined,
promise,
resolve,
};
Expand Down

0 comments on commit bf76259

Please sign in to comment.