(actions: Action[])
| 743 | } |
| 744 | |
| 745 | private addTestsToCompiledGraph(actions: Action[]) { |
| 746 | actions |
| 747 | .filter(action => action instanceof Test) |
| 748 | .map(test => test as Test) |
| 749 | .forEach(currentTest => { |
| 750 | const testTargets = this.indexedActions.find(currentTest.getTestTarget()); |
| 751 | testTargets |
| 752 | .forEach(action => { |
| 753 | if (!(action instanceof Table || action instanceof View)) { |
| 754 | this.compileError( |
| 755 | new Error( |
| 756 | `Tests are only supported for Tables and Views. Action "${targetAsReadableString(action.getTarget())}" is not a table or view".` |
| 757 | ), |
| 758 | action.getFileName(), |
| 759 | action.getTarget() |
| 760 | ); |
| 761 | } |
| 762 | }); |
| 763 | testTargets |
| 764 | .map(action => action as Table | View) |
| 765 | .forEach(tableOrViewAction => tableOrViewAction.dependencies(utils.resolvableAsTarget(currentTest.getTarget()))); |
| 766 | }); |
| 767 | } |
| 768 | |
| 769 | private removeNonUniqueActionsFromCompiledGraph(compiledGraph: dataform.CompiledGraph) { |
| 770 | function getNonUniqueTargets(targets: dataform.ITarget[]): Set<string> { |
no test coverage detected