diff --git a/lib/head.js b/lib/head.js index 542af67..51e63b8 100644 --- a/lib/head.js +++ b/lib/head.js @@ -38,7 +38,7 @@ function serverMessage(msg) { } } -function run(opts={}) { +async function run(opts={}) { let params = new URLSearchParams(location.search) let grep = opts.hasOwnProperty('grep') ? opts.grep : params.get('grep') let focus = opts.hasOwnProperty('focus') ? opts.focus : params.get('focus') @@ -61,7 +61,7 @@ function run(opts={}) { if (focus) { tests = tests.filter(t => t.fullName === focus) store.set({focusStatus: 'running'}) - Latte.run(tests) + await Latte.run(tests) } } @@ -164,6 +164,11 @@ Zen.commands = [ action: () => store.run({grep: null, force: true}), altText: 'Clear the filter to run every suite', icon: Zen.icons.Asterisk + }, { + type: 'command', title: 'Run current test until it fails', key: 'Alt F', keyCode: 70, + condition: () => store.get().focus, + action: async () => { while (true) { await store.run() } }, + icon: Zen.icons.Redo }, { type: 'command', title: 'Debug on S3', action: () => runBatchForFocus({s3: true}),