Skip to content

Commit 818be21

Browse files
Fixed lint errors
1 parent e2fe3c2 commit 818be21

File tree

6 files changed

+48
-49
lines changed

6 files changed

+48
-49
lines changed

template/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ document.body.appendChild(appContainer);
1010
/* eslint-disable no-new */
1111
new Vue({
1212
el: "#app",
13-
render: h => h(App)
13+
render: (h) => h(App)
1414
});

template/test/e2e/nightwatch.conf.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
var config = require('../../config')
1+
const config = require("../../config");
22

33
// http://nightwatchjs.org/gettingstarted#settings-file
44
module.exports = {
5-
src_folders: ['test/e2e/spec'],
6-
output_folder: 'test/e2e/report',
5+
src_folders: ["test/e2e/spec"],
6+
output_folder: "test/e2e/report",
77

88
selenium: {
99
start_process: true,
10-
server_path: require('selenium-server').path,
11-
host: '127.0.0.1',
10+
server_path: require("selenium-server").path,
11+
host: "127.0.0.1",
1212
port: 4444,
1313
cli_args: {
14-
'webdriver.chrome.driver': require('chromedriver').path
14+
"webdriver.chrome.driver": require("chromedriver").path
1515
}
1616
},
1717

1818
test_settings: {
1919
default: {
2020
selenium_port: 4444,
21-
selenium_host: 'localhost',
21+
selenium_host: "localhost",
2222
silent: true,
2323
globals: {
24-
devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port)
24+
devServerURL: "http://localhost:" + (process.env.PORT || config.dev.port)
2525
}
2626
},
2727

@@ -30,23 +30,23 @@ module.exports = {
3030
"browserName": "phantomjs",
3131
"javascriptEnabled": true,
3232
"acceptSslCerts": true,
33-
"phantomjs.binary.path": require('phantomjs-prebuilt').path
33+
"phantomjs.binary.path": require("phantomjs-prebuilt").path
3434
}
3535
},
3636
chrome: {
3737
desiredCapabilities: {
38-
browserName: 'chrome',
38+
browserName: "chrome",
3939
javascriptEnabled: true,
4040
acceptSslCerts: true
4141
}
4242
},
4343

4444
firefox: {
4545
desiredCapabilities: {
46-
browserName: 'firefox',
46+
browserName: "firefox",
4747
javascriptEnabled: true,
4848
acceptSslCerts: true
4949
}
5050
}
5151
}
52-
}
52+
};

template/test/e2e/runner.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 1. start the dev server using production config
2-
process.env.NODE_ENV = 'testing'
3-
var server = require('../../build/dev-server.js')
2+
process.env.NODE_ENV = "testing";
3+
const server = require("../../build/dev-server.js");
44

55
server.ready.then(() => {
66
// 2. run the nightwatch test suite against it
@@ -10,26 +10,26 @@ server.ready.then(() => {
1010
// or override the environment flag, for example: `npm run e2e -- --env chrome,firefox`
1111
// For more information on Nightwatch's config file, see
1212
// http://nightwatchjs.org/guide#settings-file
13-
var opts = process.argv.slice(2)
14-
if (opts.indexOf('--config') === -1) {
15-
opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js'])
13+
let opts = process.argv.slice(2);
14+
if (opts.indexOf("--config") === -1) {
15+
opts = opts.concat(["--config", "test/e2e/nightwatch.conf.js"]);
1616
}
17-
if (opts.indexOf('--env') === -1) {
18-
opts = opts.concat(['--env', 'chrome,phantomjs'])
17+
if (opts.indexOf("--env") === -1) {
18+
opts = opts.concat(["--env", "chrome,phantomjs"]);
1919
}
2020

21-
var spawn = require('cross-spawn')
22-
var runner = spawn('./node_modules/.bin/nightwatch', opts, {
23-
stdio: 'inherit'
24-
})
21+
let spawn = require("cross-spawn");
22+
let runner = spawn("./node_modules/.bin/nightwatch", opts, {
23+
stdio: "inherit"
24+
});
2525

26-
runner.on('exit', function (code) {
27-
server.close()
28-
process.exit(code)
29-
})
26+
runner.on("exit", function(code) {
27+
server.close();
28+
process.exit(code);
29+
});
3030

31-
runner.on('error', function (err) {
32-
server.close()
33-
throw err
34-
})
35-
})
31+
runner.on("error", function(err) {
32+
server.close();
33+
throw err;
34+
});
35+
});

template/test/e2e/spec/home.spec.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
const assert = require("assert");
22

33
module.exports = {
4-
'default e2e tests': function (browser) {
4+
"default e2e tests": function(browser) {
55
// automatically uses dev Server port from /config.index.js
66
// default: http://localhost:8080
77
// see nightwatch.conf.js
88
const devServer = browser.globals.devServerURL;
99

1010
browser
1111
.url(devServer)
12-
.waitForElementVisible('#main', 1000)
13-
.assert.elementPresent('.winner')
14-
.assert.containsText('.winner', 'THIS PAGE IS INTENTIONALLY STYLED POORLY');
12+
.waitForElementVisible("#main", 1000)
13+
.assert.elementPresent(".winner")
14+
.assert.containsText(".winner", "THIS PAGE IS INTENTIONALLY STYLED POORLY");
1515

16-
browser.click("ul li:first-of-type", function () {
17-
browser.elements("css selector", "ul li", function (elements) {
16+
browser.click("ul li:first-of-type", function() {
17+
browser.elements("css selector", "ul li", function(elements) {
1818
assert.equal(4, elements.value.length);
19-
browser.click("ul li:first-of-type", function () {
20-
browser.elements("css selector", "ul li", function (elements) {
19+
browser.click("ul li:first-of-type", function() {
20+
browser.elements("css selector", "ul li", function(elements) {
2121
assert.equal(1, elements.value.length);
2222
browser.end();
2323
});
2424
});
25-
})
25+
});
2626
});
2727
}
28-
}
28+
};

template/test/unit/spec/SideNav.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("SideNav.vue", () => {
2323

2424
// The only child is the "Toggle Links" item
2525
assert.equal(vm.$el.children.length, 1);
26-
})
26+
});
2727

2828
it("Shows links when clicked", (done) => {
2929
let vm = new SideNav().$mount("#app");
@@ -40,7 +40,7 @@ describe("SideNav.vue", () => {
4040
});
4141

4242

43-
it("Toggles links properly", done => {
43+
it("Toggles links properly", (done) => {
4444
let vm = new SideNav().$mount("#app");
4545

4646
// The only child is the "Toggle Links" item

template/test/unit/spec/WinnerIsYou.spec.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import Vue from "vue";
2-
import WinnerIsYouComponent, { IWinnerIsYou } from "../../../src/components/WinnerIsYou.vue";
2+
import WinnerIsYouComponent, { IWinnerIsYou } from "../../../src/components/WinnerIsYou.vue";
33
import "chai";
44
const assert = chai.assert;
55

66
const WinnerIsYou = Vue.extend(WinnerIsYouComponent);
77

88
describe("WinnerIsYou.vue", () => {
9-
109
beforeEach(() => {
1110
let main = document.getElementById("app");
1211
if (main) {
@@ -25,7 +24,7 @@ describe("WinnerIsYou.vue", () => {
2524
assert.equal(vm.$el.textContent, "");
2625
});
2726

28-
it("Updates correctly", done => {
27+
it("Updates correctly", (done) => {
2928
let vm = new WinnerIsYou().$mount("#app") as IWinnerIsYou;
3029
assert.equal(vm.text, "");
3130
assert.equal(vm.$el.textContent, "");
@@ -40,7 +39,7 @@ describe("WinnerIsYou.vue", () => {
4039
});
4140
});
4241

43-
it("Captializes correctly", done => {
42+
it("Captializes correctly", (done) => {
4443
let vm = new WinnerIsYou().$mount("#app") as IWinnerIsYou;
4544
assert.equal(vm.text, "");
4645
assert.equal(vm.$el.textContent, "");

0 commit comments

Comments
 (0)