From 801bff19b895cb985982e0003099bc2892fbe9ed Mon Sep 17 00:00:00 2001 From: patak Date: Sat, 4 Dec 2021 18:19:28 +0100 Subject: [PATCH] fix: only mode (#5) --- src/run.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/run.ts b/src/run.ts index 796358c3e966..430d9e445eb3 100644 --- a/src/run.ts +++ b/src/run.ts @@ -14,7 +14,8 @@ export async function runTask(task: Task, ctx: RunnerContext) { await reporter.onTaskBegin?.(task, ctx) await beforeEachHook.fire(task) - if (task.suite.mode === 'skip' || task.mode === 'skip') { + if (task.suite.mode === 'skip' || task.mode === 'skip' + || !(ctx.mode === 'only' && (task.suite.mode === 'only' || task.mode === 'only'))) { task.status = 'skip' } else if (task.suite.mode === 'todo' || task.mode === 'todo') {