From ca3bb38205c4f211e121e22acfb1e4ca19e2494b Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 17 Jun 2017 17:29:26 +0200 Subject: [PATCH] update test texts --- test/test.1.task.ts | 14 +++++++------- test/test.5.task.paramflow.ts | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test.1.task.ts b/test/test.1.task.ts index 88c0298..fcd1f0d 100644 --- a/test/test.1.task.ts +++ b/test/test.1.task.ts @@ -63,37 +63,37 @@ tap.test('new Task() should return a new task', async () => { testTask = new taskbuffer.Task({ taskFunction: async () => { console.log('executed twice') }, preTask: testPreTask }) }) -tap.test('testTask should be and instance of Task', async () => { +tap.test('expect testTask to be an instance of Task', async () => { expect(testTask).to.be.instanceof(taskbuffer.Task) }) -tap.test('testTask.idle is true', async () => { +tap.test('expect testTask.idle is true', async () => { if (!testTask.idle) { throw new Error('testTask.idle is not true') } }) -tap.test('testTask.running is type boolean and initially false', async () => { +tap.test('testTask.running should be of type boolean and initially false', async () => { expect(testTask.running).to.be.a('boolean') // tslint:disable-next-line:no-unused-expression expect(testTask.running).to.be.false }) -tap.test('testTask.trigger() expect return Promise', async () => { +tap.test('testTask.trigger() should return Promise', async () => { expect(testTask.trigger()).to.be.instanceof(Promise) }) -tap.test('testTask.trigger() returned Promise expect be fullfilled', async () => { +tap.test('testTask.trigger() returned Promise should be fullfilled', async () => { await testTask.trigger() }) -tap.test('expect run a task without pre and afterTask', async () => { +tap.test('expect to run a task without pre and afterTask errorless', async () => { let localTestTask = new taskbuffer.Task({ taskFunction: async () => { console.log('only once') } }) await localTestTask.trigger() }) -tap.test('expect run buffered', async () => { +tap.test('expect task to run in buffered mode', async () => { let localTestTask = new taskbuffer.Task({ taskFunction: async () => { await smartdelay.delayFor(3000) }, buffered: true, diff --git a/test/test.5.task.paramflow.ts b/test/test.5.task.paramflow.ts index 4a1b9ef..d7e7792 100644 --- a/test/test.5.task.paramflow.ts +++ b/test/test.5.task.paramflow.ts @@ -46,17 +46,17 @@ tap.test('should let a value flow through a task', async () => { expect(result).to.equal(12) }) -tap.test('should let a values flow between tasks', async () => { +tap.test('expect values to flow between tasks', async () => { let result = await flowTask2.trigger(12) expect(result).to.equal(12) }) -tap.test('expect let a values flow between tasks when buffered', async () => { +tap.test('expect values to flow between tasks when buffered', async () => { let result = await flowTaskBuffered.trigger(12) expect(result).to.equal(12) }) -tap.test('should let a values flow between tasks in Taskchain', async () => { +tap.test('expect values to flow between tasks in Taskchain', async () => { let result = await flowTask3.trigger(12) expect(result).to.equal(12) })