fix/ Fix npm run lint
This commit is contained in:
@@ -9,7 +9,7 @@ import { ElectronService } from './providers/electron.service';
|
||||
export class AppComponent {
|
||||
constructor(public electronService: ElectronService) {
|
||||
|
||||
if(electronService.isElectron()) {
|
||||
if (electronService.isElectron()) {
|
||||
console.log('Mode electron');
|
||||
// Check if electron is correctly injected (see externals in webpack.config.js)
|
||||
console.log('c', electronService.ipcRenderer);
|
||||
|
||||
@@ -24,13 +24,13 @@ describe('HomeComponent', () => {
|
||||
});
|
||||
|
||||
it(`should have as title 'App works !'`, async(() => {
|
||||
const fixture = TestBed.createComponent(HomeComponent);
|
||||
fixture = TestBed.createComponent(HomeComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('App works !');
|
||||
}));
|
||||
|
||||
it('should render title in a h1 tag', async(() => {
|
||||
const fixture = TestBed.createComponent(HomeComponent);
|
||||
fixture = TestBed.createComponent(HomeComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain('App works !');
|
||||
|
||||
@@ -12,7 +12,7 @@ export class ElectronService {
|
||||
childProcess: typeof childProcess;
|
||||
|
||||
constructor() {
|
||||
//Conditional imports
|
||||
// Conditional imports
|
||||
if (this.isElectron()) {
|
||||
this.ipcRenderer = window.require('electron').ipcRenderer;
|
||||
this.childProcess = window.require('child_process');
|
||||
|
||||
@@ -13,8 +13,8 @@ import {
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
||||
declare var __karma__: any;
|
||||
declare var require: any;
|
||||
declare const __karma__: any;
|
||||
declare const require: any;
|
||||
|
||||
// Prevent Karma from running prematurely.
|
||||
__karma__.loaded = function () {};
|
||||
|
||||
Reference in New Issue
Block a user