Skip to content
Permalink
Browse files
fix(deps): updated TSLint and fixed some minor code style issues
  • Loading branch information
jan-molak committed Apr 8, 2020
1 parent dd67218 commit f43fd14e11e2582aaa0d7cb3c186e0a58874a7fc
Showing 10 changed files with 262 additions and 163 deletions.

Large diffs are not rendered by default.

@@ -44,7 +44,7 @@
"devDependencies": {
"@types/chai": "^4.2.11",
"@types/chai-as-promised": "^7.1.2",
"@types/node": "^12.12.34",
"@types/node": "^12.12.35",
"@types/sinon": "^9.0.0",
"@types/sinon-chai": "^3.2.4",
"chai": "^4.2.0",
@@ -74,11 +74,11 @@
"nyc": "^15.0.1",
"rimraf": "^3.0.2",
"semver": "^7.2.1",
"sinon": "^9.0.1",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0",
"travis-deploy-once": "^5.0.11",
"ts-node": "^8.8.2",
"tslint": "^5.20.1",
"tslint": "^6.1.1",
"tslint-microsoft-contrib": "^6.2.0",
"typescript": "^3.8.3"
},
@@ -10,18 +10,18 @@ import { Outcome } from '@serenity-js/core/lib/model';
* @abstract
*/
export abstract class TerminalTheme {
abstract heading(...parts: any[]): string;
abstract outcome(outcome: Outcome | string, ...parts: any[]): string;
abstract separator(pattern: string): string;
abstract diff(expected: string, actual: string): string;
abstract log(...parts: any[]): string;

/**
* @param {@serenity-js/core/lib/io~AssertionReportDiffer} differ
*/
constructor(protected readonly differ: AssertionReportDiffer) {
}

abstract heading(...parts: any[]): string;
abstract outcome(outcome: Outcome | string, ...parts: any[]): string;
abstract separator(pattern: string): string;
abstract diff(expected: string, actual: string): string;
abstract log(...parts: any[]): string;

/**
* @desc
* Converts the `parts` to `string` and joins them together.
@@ -54,7 +54,6 @@
"@serenity-js/core": "2.x",
"@serenity-js/cucumber": "2.x",
"@serenity-js/jasmine": "2.x",
"@serenity-js/mocha": "2.x",
"protractor": "^5.0.0",
"selenium-webdriver": "^3.6.0"
},
@@ -1,6 +1,8 @@
import 'mocha';

import { certificates, expect } from '@integration/testing-tools';
import { Ensure, equals } from '@serenity-js/assertions';
import { Actor, actorCalled, Question, Transform } from '@serenity-js/core';
import { actorCalled, Question, Transform } from '@serenity-js/core';
import { LocalServer, ManageALocalServer, StartLocalServer, StopLocalServer } from '@serenity-js/local-server';
import express = require('express');

@@ -12,7 +14,7 @@ describe('Cookie', () => {

// a tiny express server, setting response cookies
const cookieCutterApp = express().
get('/cookie', (req: express.Request, res: express.Response) => {
get('/cookie', (req: express.Request & { query: { [key: string]: string }}, res: express.Response) => {
res.cookie(req.query.name, req.query.value, {
path: '/cookie',
domain: req.query.domain,
@@ -16,6 +16,7 @@ export class ExecuteAsynchronousScript extends ExecuteScriptWithArguments {
return BrowseTheWeb.as(actor).executeAsyncScript(this.script, ...args);
}

// tslint:disable-next-line:member-ordering
toString(): string {
return this.args.length > 0
? formatted `#actor executes an asynchronous script with arguments: ${ this.args }`
@@ -16,8 +16,6 @@ export abstract class ExecuteScriptWithArguments extends Interaction {

public abstract withArguments(...args: Array<Answerable<any>>): Interaction;

protected abstract executeAs(actor: UsesAbilities & AnswersQuestions, args: any[]): Promise<any>;

/**
* @desc
* Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
@@ -43,6 +41,8 @@ export abstract class ExecuteScriptWithArguments extends Interaction {
));
}

protected abstract executeAs(actor: UsesAbilities & AnswersQuestions, args: any[]): Promise<any>;

/**
* @private
*
@@ -16,6 +16,7 @@ export class ExecuteSynchronousScript extends ExecuteScriptWithArguments {
return BrowseTheWeb.as(actor).executeScript(this.toString(), this.script, ...args);
}

// tslint:disable-next-line:member-ordering
toString(): string {
return this.args.length > 0
? formatted `#actor executes a synchronous script with arguments: ${ this.args }`
@@ -21,6 +21,7 @@ export class InvokeSerenityBDD extends Task {
return new InvokeSerenityBDD(this.pathToArtifact, this.args, properties);
}

// tslint:disable-next-line:member-ordering
constructor(
private readonly pathToArtifact: Path,
private readonly args: Question<string[]> = Question.about(`no arguments`, actor => []),
@@ -30,11 +30,21 @@
"variable-name": [true, "ban-keywords"],
"interface-name": [true, "never-prefix"],
"max-line-length": [true, 200],
"member-ordering": [true,
"public-before-private",
"static-before-instance",
"variables-before-functions"
],
"member-ordering": [true, {
"order": [
"public-static-field",
"private-static-field",
"public-instance-field",
"private-instance-field",
"public-constructor",
"public-instance-method",
"private-constructor",
"protected-instance-method",
"private-instance-method"
],
"alphabetize": false
}],
"array-type": [true, "array-simple"],
"only-arrow-functions": false,
"arrow-parens": [true, "ban-single-arg-parens" ],
"max-classes-per-file": false,

0 comments on commit f43fd14

Please sign in to comment.