rxjs-marbles testing has no expectations

Multi tool use
up vote
0
down vote
favorite
I use rxjs-marbles for testing observables in my Angular 7 app. But it looks like m.expect
is not recognized by jasmine as expectation.
I have following test:
it('should see expectations', marbles(m => {
const source: Observable<Message> = m.hot('^a--b--c');
m.expect(source).toBeObservable('-a--b--c');
}));
When I run it I get error in console:
ERROR: 'Spec 'FeatureFlagsService should see expectations' has no expectations.'
Also in browser output my test is prefixed with:
SPEC HAS NO EXPECTATIONS should see expectations
Adding expect(true).toBe(true);
fixes the issue but this is not really way I want to go.
How to register m.expect
as a expectation for jasmine?
angular rxjs angular-test jasmine-marbles rxjs-marbles
add a comment |
up vote
0
down vote
favorite
I use rxjs-marbles for testing observables in my Angular 7 app. But it looks like m.expect
is not recognized by jasmine as expectation.
I have following test:
it('should see expectations', marbles(m => {
const source: Observable<Message> = m.hot('^a--b--c');
m.expect(source).toBeObservable('-a--b--c');
}));
When I run it I get error in console:
ERROR: 'Spec 'FeatureFlagsService should see expectations' has no expectations.'
Also in browser output my test is prefixed with:
SPEC HAS NO EXPECTATIONS should see expectations
Adding expect(true).toBe(true);
fixes the issue but this is not really way I want to go.
How to register m.expect
as a expectation for jasmine?
angular rxjs angular-test jasmine-marbles rxjs-marbles
Did you import from rxjs-marbles/jasmine? rxjs-marbles/jasmine
– dmcgrandle
2 days ago
@dmcgrandle Yes, I use this import. I will try to create a stackblitz with reproduction.
– Martin Nuc
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I use rxjs-marbles for testing observables in my Angular 7 app. But it looks like m.expect
is not recognized by jasmine as expectation.
I have following test:
it('should see expectations', marbles(m => {
const source: Observable<Message> = m.hot('^a--b--c');
m.expect(source).toBeObservable('-a--b--c');
}));
When I run it I get error in console:
ERROR: 'Spec 'FeatureFlagsService should see expectations' has no expectations.'
Also in browser output my test is prefixed with:
SPEC HAS NO EXPECTATIONS should see expectations
Adding expect(true).toBe(true);
fixes the issue but this is not really way I want to go.
How to register m.expect
as a expectation for jasmine?
angular rxjs angular-test jasmine-marbles rxjs-marbles
I use rxjs-marbles for testing observables in my Angular 7 app. But it looks like m.expect
is not recognized by jasmine as expectation.
I have following test:
it('should see expectations', marbles(m => {
const source: Observable<Message> = m.hot('^a--b--c');
m.expect(source).toBeObservable('-a--b--c');
}));
When I run it I get error in console:
ERROR: 'Spec 'FeatureFlagsService should see expectations' has no expectations.'
Also in browser output my test is prefixed with:
SPEC HAS NO EXPECTATIONS should see expectations
Adding expect(true).toBe(true);
fixes the issue but this is not really way I want to go.
How to register m.expect
as a expectation for jasmine?
angular rxjs angular-test jasmine-marbles rxjs-marbles
angular rxjs angular-test jasmine-marbles rxjs-marbles
asked 2 days ago
Martin Nuc
3,75222739
3,75222739
Did you import from rxjs-marbles/jasmine? rxjs-marbles/jasmine
– dmcgrandle
2 days ago
@dmcgrandle Yes, I use this import. I will try to create a stackblitz with reproduction.
– Martin Nuc
2 days ago
add a comment |
Did you import from rxjs-marbles/jasmine? rxjs-marbles/jasmine
– dmcgrandle
2 days ago
@dmcgrandle Yes, I use this import. I will try to create a stackblitz with reproduction.
– Martin Nuc
2 days ago
Did you import from rxjs-marbles/jasmine? rxjs-marbles/jasmine
– dmcgrandle
2 days ago
Did you import from rxjs-marbles/jasmine? rxjs-marbles/jasmine
– dmcgrandle
2 days ago
@dmcgrandle Yes, I use this import. I will try to create a stackblitz with reproduction.
– Martin Nuc
2 days ago
@dmcgrandle Yes, I use this import. I will try to create a stackblitz with reproduction.
– Martin Nuc
2 days ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239173%2frxjs-marbles-testing-has-no-expectations%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Ga9AdQrK0XZ j SXM44Nw KK633 Ewi1XscijgDmtw,bhf,Uko5p nhuV m rTz,OOGBNhDcuq pm4cfRA,j 0aGBnUlJ jROOqz2aQxk8c
Did you import from rxjs-marbles/jasmine? rxjs-marbles/jasmine
– dmcgrandle
2 days ago
@dmcgrandle Yes, I use this import. I will try to create a stackblitz with reproduction.
– Martin Nuc
2 days ago