Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jasmine-Marbles ^0.5.0 does not work in Angular 8 #40

Closed
Rlcolli4 opened this issue Jun 4, 2019 · 2 comments
Closed

Jasmine-Marbles ^0.5.0 does not work in Angular 8 #40

Rlcolli4 opened this issue Jun 4, 2019 · 2 comments

Comments

@Rlcolli4
Copy link

Rlcolli4 commented Jun 4, 2019

I also comented on this #21 thread, but after upgrading to Angular 8 and Material 8 with the corresponding CLI and modules, Jasmine-Marble based tests will fail. We use these to test ngrx effects.

We get the following error when we try to run those tests:
Screen Shot 2019-06-04 at 11 16 11 AM

@kekel87
Copy link

kekel87 commented Jun 7, 2019

Hi, as workaround you can add 'jasmine-marbles' initialisation code in your test.ts file (source).

// test.ts
import { addMatchers, getTestScheduler, initTestScheduler, resetTestScheduler } from 'jasmine-marbles';

jasmine.getEnv().beforeAll(() => {
  return addMatchers();
});
jasmine.getEnv().beforeEach(() => {
  initTestScheduler();
});
jasmine.getEnv().afterEach(() => {
  getTestScheduler().flush();
  resetTestScheduler();
});

brandonroberts added a commit that referenced this issue Jun 18, 2019
This check is no longer needed and prevents the setup logic from
running when tests are compiled to es2015

Closes #21, #37, #40
brandonroberts added a commit that referenced this issue Jun 18, 2019
… exports check

This check is no longer needed and prevents the setup logic from
running when tests are compiled to es2015

Closes #21, #37, #40
brandonroberts added a commit that referenced this issue Jun 18, 2019
… exports check (#41)

This check is no longer needed and prevents the setup logic from
running when tests are compiled to es2015

Closes #21, #37, #40
@brandonroberts
Copy link
Member

Fixed via #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants