Skip to content

Commit

Permalink
openvidu-components: Added prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Jan 20, 2022
1 parent 3c97cea commit 31f5206
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 69 deletions.
10 changes: 10 additions & 0 deletions openvidu-components-angular/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"printWidth": 140,
"trailingComma": "none",
"semi": true,
"bracketSpacing": true,
"useTabs": true,
"jsxSingleQuote": true,
"tabWidth": 4
}
3 changes: 1 addition & 2 deletions openvidu-components-angular/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

<router-outlet></router-outlet>
<router-outlet></router-outlet>
44 changes: 21 additions & 23 deletions openvidu-components-angular/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,28 @@ import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [AppComponent]
}).compileComponents();
}));

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});

it(`should have as title 'openvidu-components'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('openvidu-components');
});
it(`should have as title 'openvidu-components'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('openvidu-components');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('openvidu-components app is running!');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('openvidu-components app is running!');
});
});
1 change: 0 additions & 1 deletion openvidu-components-angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ export class AppComponent implements OnInit {
constructor() {}

ngOnInit() {}

}
54 changes: 28 additions & 26 deletions openvidu-components-angular/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,35 @@ import { ChatTestComponent } from './components/chat-test/chat-test.component';
import { LayoutTestComponent } from './components/layout-test/layout-test.component';
import { ParticipantTestComponent } from './components/participant-test/participant-test.component';

import { OpenviduAngularModule, UserSettingsComponent, ChatComponent, ToolbarComponent, RoomComponent, LayoutComponent } from 'openvidu-angular';
import {
OpenviduAngularModule,
UserSettingsComponent,
ChatComponent,
ToolbarComponent,
RoomComponent,
LayoutComponent,
VideoconferenceComponent
} from 'openvidu-angular';
import { MatButtonModule } from '@angular/material/button';

@NgModule({
declarations: [
AppComponent,
DashboardComponent,
CallComponent,
ToolbarTestComponent,
ChatTestComponent,
LayoutTestComponent,
ParticipantTestComponent
],
imports: [
BrowserModule,
MatButtonModule,
BrowserAnimationsModule,
OpenviduAngularModule.forRoot(environment),
AppRoutingModule // Order is important, AppRoutingModule must be the last import for useHash working
],
providers: [
UserSettingsComponent,
ToolbarComponent,
ChatComponent,
RoomComponent,
LayoutComponent
],
bootstrap: [AppComponent]
declarations: [
AppComponent,
DashboardComponent,
CallComponent,
ToolbarTestComponent,
ChatTestComponent,
LayoutTestComponent,
ParticipantTestComponent
],
imports: [
BrowserModule,
MatButtonModule,
BrowserAnimationsModule,
OpenviduAngularModule.forRoot(environment),
AppRoutingModule // Order is important, AppRoutingModule must be the last import for useHash working
],
providers: [VideoconferenceComponent, UserSettingsComponent, ToolbarComponent, ChatComponent, RoomComponent, LayoutComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {}
11 changes: 4 additions & 7 deletions openvidu-components-angular/src/app/app.routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ import { ChatTestComponent } from './components/chat-test/chat-test.component';
import { LayoutTestComponent } from './components/layout-test/layout-test.component';
import { ParticipantTestComponent } from './components/participant-test/participant-test.component';



const routes: Routes = [
{ path: '', component: DashboardComponent },
{ path: 'call', component: CallComponent },
{ path: 'toolbar', component: ToolbarTestComponent },
{ path: 'chat', component: ChatTestComponent },
{ path: 'layout', component: LayoutTestComponent },
{ path: 'participant', component: ParticipantTestComponent },

{ path: 'participant', component: ParticipantTestComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes, {useHash: true})],
exports: [RouterModule],
imports: [RouterModule.forRoot(routes, { useHash: true })],
exports: [RouterModule]
})
export class AppRoutingModule { }
export class AppRoutingModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import { Component, OnInit } from '@angular/core';
import { RestService } from '../services/rest.service';
import { Router } from '@angular/router';


@Component({
selector: 'app-call',
templateUrl: './call.component.html',
styleUrls: ['./call.component.scss']
})

export class CallComponent implements OnInit {
sessionId = 'prueba-majestuosa-amable';
tokens: { webcam: string; screen: string };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { TestBed } from '@angular/core/testing';
import { RestService } from './rest.service';

describe('RestService', () => {
let service: RestService;
let service: RestService;

beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(RestService);
});
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(RestService);
});

it('should be created', () => {
expect(service).toBeTruthy();
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

0 comments on commit 31f5206

Please sign in to comment.