Skip to content

Commit 54d33e7

Browse files
committed
refactor(state): polish code
1 parent 79ed9b7 commit 54d33e7

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

libs/state/actions/src/lib/docs.spec.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
11
import { TestBed } from '@angular/core/testing';
2-
import {
3-
Component,
4-
inject,
5-
Injectable,
6-
InjectionToken,
7-
Output,
8-
Provider,
9-
} from '@angular/core';
2+
import { Component, inject, Injectable, Output } from '@angular/core';
103
import { rxActions } from './rx-actions';
114
import { eventValue } from './transforms';
125
import { ActionTransforms } from '@rx-angular/state/actions';
13-
import {
14-
debounceTime,
15-
exhaustMap,
16-
Observable,
17-
timer,
18-
map,
19-
Subject,
20-
of,
21-
} from 'rxjs';
6+
import { debounceTime, exhaustMap, Observable, Subject, of } from 'rxjs';
227
import { wait } from 'nx-cloud/lib/utilities/waiter';
238
import { take } from 'rxjs/operators';
249

libs/state/actions/src/lib/rx-actions.spec.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
// eslint-disable-next-line @nx/enforce-module-boundaries
2-
import { mockConsole } from '@test-helpers';
31
import { rxActions } from './rx-actions';
42
import { debounceTime, isObservable } from 'rxjs';
53
import { Component, ErrorHandler, Provider } from '@angular/core';
64
import { TestBed } from '@angular/core/testing';
75
import { ActionTransforms } from '@rx-angular/state/actions';
86

97
describe('actions fn', () => {
10-
beforeAll(() => mockConsole());
11-
128
it('should get created properly', () => {
139
const { component } = setupComponent<Actions>();
1410
expect(typeof component.actions.prop).toBe('function');
@@ -196,7 +192,7 @@ describe('actions fn', () => {
196192
});
197193

198194
it('should throw if called outside of injection context', () => {
199-
expect(() => rxActions<Actions>()).not.toThrow('');
195+
expect(() => rxActions<Actions>()).toThrow('');
200196
});
201197
});
202198

0 commit comments

Comments
 (0)