fix(tests): Update CI workflows, fix tests and refresh README/package metadata

This commit is contained in:
2025-08-26 20:16:47 +00:00
parent 863adb3b8c
commit dc47bc3d2a
20 changed files with 201 additions and 125 deletions

View File

@@ -16,7 +16,7 @@ tap.test('should have bufferMax set to the provided value', async () => {
const task2 = new taskbuffer.Task({
taskFunction: async () => {},
});
expect(task2.bufferMax).toBeUndefined(); // test for a task without bufferMax set
expect(task2.bufferMax).toBeUndefined(); // test for a task without bufferMax set
const bufferedTask = new taskbuffer.Task({
taskFunction: async () => {},
buffered: true,
@@ -26,7 +26,7 @@ tap.test('should have bufferMax set to the provided value', async () => {
});
tap.test('should be able to trigger tasks multiple times', async () => {
let task1Counter = 0;
let task1Counter = 0;
const task1 = new taskbuffer.Task({
name: 'Task 1',
taskFunction: () => {
@@ -49,10 +49,12 @@ tap.test('should execute setup function before the task function', async () => {
const task2 = new taskbuffer.Task({
name: 'Task 2',
taskSetup: async () => {
console.log('this is the setup function for task 2. It should only run once.')
console.log(
'this is the setup function for task 2. It should only run once.',
);
return {
nice: 'yes',
}
};
},
taskFunction: async (before, setupArg) => {
expect(setupArg).toEqual({ nice: 'yes' });