Skip to content

Commit

Permalink
feat: export environment setup function for jasmine and remove module…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
brandonroberts committed Jun 18, 2019
1 parent 2a4d8e2 commit b57472a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function addMatchers() {
});
}

if (typeof module === 'object' && module.exports) {
export function setupEnvironment() {
jasmine.getEnv().beforeAll(() => addMatchers());

jasmine.getEnv().beforeEach(() => initTestScheduler());
Expand All @@ -167,3 +167,5 @@ if (typeof module === 'object' && module.exports) {
resetTestScheduler();
});
}

setupEnvironment();

0 comments on commit b57472a

Please sign in to comment.