-
Philipp Hancke authored
passes the test argument in promise_test and async_test so it can be used to add cleanup. Change done with a jscodeshift codemod that detects there were no arguments to promise_test (or async_test): export default function transformer(file, api) { const j = api.jscodeshift; return j(file.source) // .find(j.CallExpression) .find(j.CallExpression, {callee: {type: 'Identifier', name: 'promise_test'}}) .forEach(path => { if (path.value.arguments[0].params.length === 0) { path.value.arguments[0].params.push(j.identifier('t')); } }) .toSource(); }; BUG=836871 Change-Id: Ie7dd7fb0dd8a4da6c4c00f3616fd41d1d47854ef Reviewed-on: https://chromium-review.googlesource.com/1047674Reviewed-by:Harald Alvestrand <hta@chromium.org> Commit-Queue: Harald Alvestrand <hta@chromium.org> Cr-Commit-Position: refs/heads/master@{#556711}
ae6a05c5