Skip to content

Commit

Permalink
[ftr/mocha] assign interceptors to mocha ui recursively (#12822)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger authored Jul 13, 2017
1 parent 18c9ea4 commit ffe5919
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/functional_test_runner/lib/mocha/decorate_mocha_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,24 @@ export function decorateMochaUi(lifecycle, context) {
return value;
}

value = createAssignmentProxy(value, (subProperty, subValue) => {
return assignmentInterceptor(`${property}.${subProperty}`, subValue);
});

switch (property) {
case 'describe':
case 'describe.only':
case 'xdescribe':
case 'context':
case 'context.only':
case 'xcontext':
return wrapSuiteFunction(property, value);

case 'it':
case 'it.only':
case 'xit':
case 'specify':
case 'specify.only':
case 'xspecify':
return wrapTestFunction(property, value);

Expand Down

0 comments on commit ffe5919

Please sign in to comment.