aboutsummaryrefslogtreecommitdiff
path: root/sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-02-28 19:48:30 +0100
committerNevena Bojovic <nenabojov@gmail.com>2022-02-28 19:48:30 +0100
commit1fa69862057db4db53cfda5be9c24b4228ef63f7 (patch)
tree7ccbb29a54f62bbbf72eddcdab374f23ce8799e5 /sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts
parent2d1768a0683c43db2934701abbf2171c3f0a3988 (diff)
parent3bb27fb8bc5ee54cd8ffe818059c18cd168b4353 (diff)
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into testAppNevena
Diffstat (limited to 'sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts')
-rw-r--r--sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts b/sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts
new file mode 100644
index 00000000..74b5b3eb
--- /dev/null
+++ b/sandbox/test-projekat-danijel/frontend/src/app/app.component.spec.ts
@@ -0,0 +1,35 @@
+import { TestBed } from '@angular/core/testing';
+import { RouterTestingModule } from '@angular/router/testing';
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [
+ RouterTestingModule
+ ],
+ declarations: [
+ AppComponent
+ ],
+ }).compileComponents();
+ });
+
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
+
+ it(`should have as title 'frontend'`, () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app.title).toEqual('frontend');
+ });
+
+ it('should render title', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.nativeElement as HTMLElement;
+ expect(compiled.querySelector('.content span')?.textContent).toContain('frontend app is running!');
+ });
+});