Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
envol
ENVOL 2021 TP Angular 2
Commits
c926a760
Commit
c926a760
authored
Nov 08, 2021
by
François Agneray
Browse files
Delete test app component
parent
432881af
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/src/app/app.component.spec.ts
deleted
100644 → 0
View file @
432881af
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 'client'`
,
()
=>
{
const
fixture
=
TestBed
.
createComponent
(
AppComponent
);
const
app
=
fixture
.
componentInstance
;
expect
(
app
.
title
).
toEqual
(
'
client
'
);
});
it
(
'
should render title
'
,
()
=>
{
const
fixture
=
TestBed
.
createComponent
(
AppComponent
);
fixture
.
detectChanges
();
const
compiled
=
fixture
.
nativeElement
as
HTMLElement
;
expect
(
compiled
.
querySelector
(
'
.content span
'
)?.
textContent
).
toContain
(
'
client app is running!
'
);
});
});
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment