ref/ set default angular eslint rules
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
const Application = require('spectron').Application;
|
||||
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules.
|
||||
const path = require('path');
|
||||
const APPLICATION = require('spectron').Application;
|
||||
const ELECTRON_PATH = require('electron'); // Require Electron from the binaries included in node_modules.
|
||||
const PATH = require('path');
|
||||
|
||||
export default function setup(): void {
|
||||
beforeEach(async function () {
|
||||
this.app = new Application({
|
||||
beforeEach(async () => {
|
||||
this.app = new APPLICATION({
|
||||
// Your electron path can be any binary
|
||||
// i.e for OSX an example path could be '/Applications/MyApp.app/Contents/MacOS/MyApp'
|
||||
// But for the sake of the example we fetch it from our node_modules.
|
||||
path: electronPath,
|
||||
path: ELECTRON_PATH,
|
||||
|
||||
// Assuming you have the following directory structure
|
||||
|
||||
@@ -23,14 +23,14 @@ export default function setup(): void {
|
||||
|
||||
// The following line tells spectron to look and use the main.js file
|
||||
// and the package.json located 1 level above.
|
||||
args: [path.join(__dirname, '..')],
|
||||
args: [PATH.join(__dirname, '..')],
|
||||
webdriverOptions: {}
|
||||
});
|
||||
|
||||
await this.app.start();
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
afterEach(async () => {
|
||||
if (this.app && this.app.isRunning()) {
|
||||
await this.app.stop();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SpectronClient } from 'spectron';
|
||||
|
||||
import commonSetup from './common-setup';
|
||||
|
||||
describe('angular-electron App', function () {
|
||||
describe('angular-electron App', () => {
|
||||
|
||||
commonSetup.apply(this);
|
||||
|
||||
@@ -13,12 +13,12 @@ describe('angular-electron App', function () {
|
||||
client = this.app.client;
|
||||
});
|
||||
|
||||
it('creates initial windows', async function () {
|
||||
it('creates initial windows', async () => {
|
||||
const count = await client.getWindowCount();
|
||||
expect(count).to.equal(1);
|
||||
});
|
||||
|
||||
it('should display message saying App works !', async function () {
|
||||
it('should display message saying App works !', async () => {
|
||||
const elem = await client.$('app-home h1');
|
||||
const text = await elem.getText();
|
||||
expect(text).to.equal('App works !');
|
||||
|
||||
Reference in New Issue
Block a user