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

Commit e9cb4a6

Browse files
committed
Clang format
1 parent cbd03c7 commit e9cb4a6

File tree

5 files changed

+14
-23
lines changed

5 files changed

+14
-23
lines changed

lib/blockingproxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class BlockingProxy implements WebDriverBarrier {
204204
'POST', BlockingProxy.executeAsyncUrl(url), function(stabilityResponse) {
205205
// TODO - If the response is that angular is not available on the
206206
// page, should we just go ahead and continue?
207-
let stabilityData = ''
207+
let stabilityData = '';
208208
stabilityResponse.on('data', (data) => {
209209
stabilityData += data;
210210
});

lib/webdriver_commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class WebDriverCommand extends events.EventEmitter {
119119

120120
public handleResponse(statusCode: number, data?: any) {
121121
this.responseStatus = statusCode;
122-
if(data) {
122+
if (data) {
123123
this.responseData = JSON.parse(data);
124124
}
125125
this.emit('response');

spec/unit/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as stream from 'stream';
22

3-
import {WebDriverBarrier} from "../../lib/webdriver_proxy";
4-
import {WebDriverCommand, CommandName} from "../../lib/webdriver_commands";
3+
import {CommandName, WebDriverCommand} from '../../lib/webdriver_commands';
4+
import {WebDriverBarrier} from '../../lib/webdriver_proxy';
55

66
/**
77
* Fakes and helpers for testing.
@@ -52,7 +52,7 @@ export class InMemoryReader extends stream.Readable {
5252

5353
constructor() {
5454
super();
55-
this.content = []
55+
this.content = [];
5656
this.idx = 0;
5757
}
5858

spec/unit/webdriver_commands_spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as webdriver from 'selenium-webdriver';
55
import {CommandName} from '../../lib/webdriver_commands';
66
import {WebDriverProxy} from '../../lib/webdriver_proxy';
77
import {getMockSelenium, Session} from '../helpers/mock_selenium';
8-
import {TestBarrier} from "./util";
8+
import {TestBarrier} from './util';
99

1010
describe('WebDriver command parser', () => {
1111
let mockServer: Server<Session>;
@@ -43,9 +43,7 @@ describe('WebDriver command parser', () => {
4343
let recentCommands = testBarrier.getCommandNames();
4444
expect(recentCommands.length).toBe(3);
4545
expect(recentCommands).toEqual([
46-
CommandName.NewSession,
47-
CommandName.Go,
48-
CommandName.DeleteSession
46+
CommandName.NewSession, CommandName.Go, CommandName.DeleteSession
4947
]);
5048
expect(testBarrier.commands[1].sessionId).toEqual(sessionId);
5149
});
@@ -56,9 +54,7 @@ describe('WebDriver command parser', () => {
5654
let recentCommands = testBarrier.getCommandNames();
5755
expect(recentCommands.length).toBe(3);
5856
expect(recentCommands).toEqual([
59-
CommandName.NewSession,
60-
CommandName.Go,
61-
CommandName.GetCurrentURL
57+
CommandName.NewSession, CommandName.Go, CommandName.GetCurrentURL
6258
]);
6359
});
6460

spec/unit/webdriver_proxy_spec.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import * as nock from 'nock';
22

3+
import {CommandName, WebDriverCommand} from '../../lib/webdriver_commands';
34
import {WebDriverProxy} from '../../lib/webdriver_proxy';
4-
import {InMemoryReader, InMemoryWriter, TestBarrier} from "./util";
5-
import {WebDriverCommand, CommandName} from "../../lib/webdriver_commands";
5+
6+
import {InMemoryReader, InMemoryWriter, TestBarrier} from './util';
67

78
describe('WebDriver Proxy', () => {
89
let proxy: WebDriverProxy;
@@ -19,9 +20,7 @@ describe('WebDriver Proxy', () => {
1920
req.method = 'GET';
2021
const responseData = {value: 'selenium response'};
2122

22-
let scope = nock(proxy.seleniumAddress)
23-
.get('/session/sessionId/get')
24-
.reply(200, responseData);
23+
let scope = nock(proxy.seleniumAddress).get('/session/sessionId/get').reply(200, responseData);
2524

2625
proxy.requestListener(req, resp);
2726

@@ -71,9 +70,7 @@ describe('WebDriver Proxy', () => {
7170
req.url = WD_URL;
7271
req.method = 'GET';
7372

74-
let scope = nock(proxy.seleniumAddress)
75-
.get(WD_URL)
76-
.reply(200, RESPONSE);
73+
let scope = nock(proxy.seleniumAddress).get(WD_URL).reply(200, RESPONSE);
7774

7875
let barrier = new TestBarrier();
7976
barrier.onCommand = (command: WebDriverCommand): Promise<void> => {
@@ -98,9 +95,7 @@ describe('WebDriver Proxy', () => {
9895
req.url = WD_URL;
9996
req.method = 'POST';
10097

101-
let scope = nock(proxy.seleniumAddress)
102-
.post(WD_URL)
103-
.replyWithError(ERR);
98+
let scope = nock(proxy.seleniumAddress).post(WD_URL).replyWithError(ERR);
10499

105100
proxy.requestListener(req, resp);
106101

0 commit comments

Comments
 (0)