Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

rework debugprint to ts #5074

Merged
merged 7 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions lib/frameworks/debugprint.js

This file was deleted.

21 changes: 21 additions & 0 deletions lib/frameworks/debugprint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as util from 'util';
import {Logger} from '../logger';
import {Runner} from '../runner';
import {RunResults} from '../taskRunner';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`import {RunResults} from '../taskRunner';

We might need to update the RunResults to be more flexible:
https://github.com/angular/protractor/blob/selenium4/lib/taskRunner.ts#L9

export interface RunResults {
  taskId?: number;
  specs?: Array<string>;
  ...

const logger = new Logger('debugger');

/**
* A debug framework which does not actually run any tests, just spits
* out the list that would be run.
*
* @param {Runner} runner The current Protractor Runner.
* @param {Array} specs Array of Directory Path Strings.
* @return {Promise} Promise resolved with the test results
*/
export const run = (runner: Runner, specs: Array<string>): Promise<RunResults> => {
return new Promise(resolve => {
logger.info(`Resolved spec files: ${util.inspect(specs)}`);
resolve({failedCount: 0});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the changes are made to RunResults you probably do not need to cast. If for some reason there are type errors, you might need to cast this to resolve({failedCount: 0} as RunResults);

});
};