Skip to content

Commit

Permalink
Fix eol-last rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Aug 22, 2023
1 parent e34c595 commit 4ff2aac
Show file tree
Hide file tree
Showing 56 changed files with 69 additions and 69 deletions.
4 changes: 2 additions & 2 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const exportedCommands = [
const basePath = '../dist/api';
const Commands = {};
const props = exportedCommands.reduce((prev, fileName) => {
const commandName = fileName.substring(fileName.lastIndexOf('/')+1).replace('.js', '');
const commandName = fileName.substring(fileName.lastIndexOf('/') + 1).replace('.js', '');
prev[commandName] = {
configurable: true,
get: function() {
Expand All @@ -29,4 +29,4 @@ const props = exportedCommands.reduce((prev, fileName) => {

Object.defineProperties(Commands, props);

module.exports = Commands;
module.exports = Commands;
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Then(/^the title is "([^"]*)"$/, function(title) {

Then(/^Body contains "([^"]*)"$/, function(contains) {
return browser.assert.textContains('.search-results', contains);
});
});
2 changes: 1 addition & 1 deletion examples/custom-commands/strictClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
return this.waitForElementVisible(selector)
.click(selector);
}
};
};
4 changes: 2 additions & 2 deletions examples/pages/google/searchResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const menuCommands = {
var self = this;

return this.getAttribute(product, 'class', function (result) {
let isSelected = result.value.indexOf('hdtb-msel') > -1;
const isSelected = result.value.indexOf('hdtb-msel') > -1;
callback.call(self, isSelected);
});
}
Expand Down Expand Up @@ -44,4 +44,4 @@ module.exports = {
}
}
}
};
};
2 changes: 1 addition & 1 deletion examples/tests/element/elementapi-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ describe('queries tests', function() {
});


});
});
2 changes: 1 addition & 1 deletion examples/tests/sample-with-relative-locators.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ describe('sample with relative locators', function () {
});

after(browser => browser.end());
});
});
2 changes: 1 addition & 1 deletion examples/tests/selectElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ module.exports = {
})
.assert.selected(await selectElement.findElement('option[value=four]'), 'Forth option is selected');
}
};
};
2 changes: 1 addition & 1 deletion examples/tests/shadowRootExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ describe('Shadow Root example test', function() {
// await expect.element(firstElement).to.be.an('img');

});
});
});
2 changes: 1 addition & 1 deletion examples/unittests/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ module.exports = {
assert.strictEqual(Utils.getTestSuiteName('test.case.one'), 'Test Case One');
assert.strictEqual(Utils.getTestSuiteName('testCaseOne'), 'Test Case One');
}
};
};
2 changes: 1 addition & 1 deletion examples/unittests/testUtilsWithChai.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ module.exports = {
var resultMs = Utils.formatElapsedTime(999);
expect(resultMs).to.equal('999ms');
}
};
};
2 changes: 1 addition & 1 deletion lib/api/assertions/selected.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ exports.assertion = function(definition, msg) {
this.api.isSelected(definition, callback);
};

};
};
2 changes: 1 addition & 1 deletion lib/api/client-commands/axeInject.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ module.exports = class AxeInjectAbstract {
static get allowOverride() {
return true;
}
};
};
2 changes: 1 addition & 1 deletion lib/api/client-commands/saveSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ class SaveSnapshot extends ClientCommand {
}
}

module.exports = SaveSnapshot;
module.exports = SaveSnapshot;
2 changes: 1 addition & 1 deletion lib/api/client-commands/setDeviceDimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ class SetDeviceDimensions extends ClientCommand {
}
}

module.exports = SetDeviceDimensions;
module.exports = SetDeviceDimensions;
2 changes: 1 addition & 1 deletion lib/api/client-commands/within.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ module.exports = class WithinAbstract {
static get allowOverride() {
return true;
}
};
};
2 changes: 1 addition & 1 deletion lib/api/element-commands/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ class ClickElement extends BaseElementCommand {
}
}

module.exports = ClickElement;
module.exports = ClickElement;
2 changes: 1 addition & 1 deletion lib/api/element-commands/isEnabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ class IsEnabled extends BaseElementCommand {

}

module.exports = IsEnabled;
module.exports = IsEnabled;
2 changes: 1 addition & 1 deletion lib/api/element-commands/isSelected.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ class IsSelected extends BaseElementCommand {

}

module.exports = IsSelected;
module.exports = IsSelected;
2 changes: 1 addition & 1 deletion lib/api/element-commands/setPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class SetPassword extends BaseElementCommand {
}
}

module.exports = SetPassword;
module.exports = SetPassword;
2 changes: 1 addition & 1 deletion lib/api/element-commands/uploadFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ class UploadFile extends BaseElementCommand {
}


module.exports = UploadFile;
module.exports = UploadFile;
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getAccessibleName.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommandScoped('getElementAccessibleName');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getAriaRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommandScoped('getElementAriaRole');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
*/
module.exports.command = function(name) {
return this.runQueuedCommandScoped('getElementValue', name);
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getCssProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
*/
module.exports.command = function(cssProperty) {
return this.runQueuedCommandScoped('getElementCSSValue', cssProperty);
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getId.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ module.exports.command = function() {
return this.runQueuedCommandScoped(function (webElement) {
return webElement.getId();
});
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
*/
module.exports.command = function(name) {
return this.runQueuedCommandScoped('getElementProperty', name);
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getRect.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommandScoped('getElementRect');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getTagName.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommandScoped('getElementTagName');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getText.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommandScoped('getElementText');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/getValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
*/
module.exports.command = function () {
return this.getProperty('value');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/rightClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommand('contextClick');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/setAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ module.exports.command = function(name, value) {
return this.runQueuedCommand('setElementAttribute', {
args: [name, value]
});
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/setProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ module.exports.command = function(name, value) {
return this.runQueuedCommand('setElementProperty', {
args: [name, value]
});
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommand('elementSubmit');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/takeScreenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
*/
module.exports.command = function() {
return this.runQueuedCommandScoped('takeElementScreenshot');
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/commands/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ module.exports.command = function(file) {
return this.runQueuedCommand('uploadFile', {
args: [file]
});
};
};
2 changes: 1 addition & 1 deletion lib/api/web-element/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ module.exports.root = function(nightwatchInstance) {
};

module.exports.createScopedWebElements = Factory.createScopedWebElements;
module.exports.create = Factory.create;
module.exports.create = Factory.create;
2 changes: 1 addition & 1 deletion lib/reporter/axe-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ module.exports = class AxeReport {
// eslint-disable-next-line no-console
console.log(table.toString());
}
};
};
6 changes: 3 additions & 3 deletions lib/runner/concurrency/worker-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ class WorkerTask extends EventEmitter {

async runWorkerTask(colors, type) {
this.availColors = colors;
const colorPair = this.availColors[this.index%4];
const colorPair = this.availColors[this.index % 4];
this.setlabel(colorPair);

this.printLog('Running '+ Logger.colors[colorPair[0]][colorPair[1]](` ${this.task_label} `));
this.printLog('Running ' + Logger.colors[colorPair[0]][colorPair[1]](` ${this.task_label} `));

const {port1, port2} = new MessageChannel();
port2.onmessage = ({data: result}) => {
Expand Down Expand Up @@ -112,4 +112,4 @@ class WorkerTask extends EventEmitter {
}
}

module.exports = WorkerTask;
module.exports = WorkerTask;
12 changes: 6 additions & 6 deletions lib/runner/test-runners/mocha/custom-runnable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = async function(fn, isHook = false) {
let self = this;
let start = new Date();
let ctx = this.ctx;
const self = this;
const start = new Date();
const ctx = this.ctx;
let finished;

if (this.isPending()) {
Expand All @@ -24,7 +24,7 @@ module.exports = async function(fn, isHook = false) {
return;
}
emitted = true;
let msg = 'done() called multiple times';
const msg = 'done() called multiple times';
if (err && err.message) {
err.message += ` (and Mocha's ${msg})`;
self.emit('error', err);
Expand All @@ -35,7 +35,7 @@ module.exports = async function(fn, isHook = false) {

// finished
function done(err) {
let ms = self.timeout();
const ms = self.timeout();
if (self.timedOut) {
return;
}
Expand Down Expand Up @@ -125,4 +125,4 @@ module.exports = async function(fn, isHook = false) {
done(err);
emitted = true;
}
};
};
2 changes: 1 addition & 1 deletion lib/runner/test-runners/mocha/custom-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ module.exports = class CustomRunner extends Mocha.Runner {

super.run(fn);
}
};
};
2 changes: 1 addition & 1 deletion lib/runner/test-runners/mocha/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ module.exports = class Extensions {
suite.timeout(30000);
}
}
};
};
2 changes: 1 addition & 1 deletion lib/runner/test-runners/mocha/nightwatchSuite.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ module.exports.init = function({suite, nightwatchSuite}) {
console.error(err);
process.exit(1);
});
};
};
2 changes: 1 addition & 1 deletion lib/testsuite/hooks/afterAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ class AfterAll extends BaseHook {
}
}

module.exports = AfterAll;
module.exports = AfterAll;
2 changes: 1 addition & 1 deletion lib/testsuite/hooks/afterEach.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ class AfterEach extends BaseHook {
}
}

module.exports = AfterEach;
module.exports = AfterEach;
2 changes: 1 addition & 1 deletion lib/testsuite/hooks/beforeAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class BeforeAll extends BaseHook {
}
}

module.exports = BeforeAll;
module.exports = BeforeAll;
2 changes: 1 addition & 1 deletion lib/testsuite/hooks/beforeEach.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class BeforeAll extends BaseHook {
}
}

module.exports = BeforeAll;
module.exports = BeforeAll;
Loading

0 comments on commit 4ff2aac

Please sign in to comment.