Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abfa68a

Browse files
committed
refactor(state): rename files
1 parent a2ba184 commit abfa68a

File tree

3 files changed

+3
-27
lines changed

3 files changed

+3
-27
lines changed

libs/state/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { RxStateSetupFn, rxState } from './lib/inject';
1+
export { RxStateSetupFn, rxState } from './lib/rx-state';
22
export {
33
ProjectStateFn,
44
ProjectStateReducer,

libs/state/src/lib/inject.spec.ts renamed to libs/state/src/lib/rx-state.spec.ts

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Component } from '@angular/core';
22
import { TestBed } from '@angular/core/testing';
33
import { of } from 'rxjs';
4-
import { RxStateSetupFn, rxState } from './inject';
4+
import { RxStateSetupFn, rxState } from './rx-state';
55

66
describe(rxState, () => {
7-
it('should create RxState instance', () => {
7+
it('should create rxState', () => {
88
const { component } = setupComponent();
99
expect(component.state).toBeDefined();
1010
});
@@ -27,30 +27,6 @@ describe(rxState, () => {
2727
expect(component.state.get()).toEqual({ count: 20 });
2828
});
2929

30-
/*it('should hold an observable', () => {
31-
const spy = jest.fn();
32-
setupComponent<{ count: number }>(({ hold }) =>
33-
hold(of('src').pipe(tap(spy)))
34-
);
35-
expect(spy).toHaveBeenCalledWith('src');
36-
});
37-
38-
it('should hold an observable and sideEffect fn', () => {
39-
const spy = jest.fn();
40-
setupComponent<{ count: number }>(({ hold }) => hold(of('src'), spy));
41-
expect(spy).toHaveBeenCalledWith('src');
42-
});
43-
44-
it('should hold multiple observables', () => {
45-
const spy = jest.fn();
46-
setupComponent<{ count: number }>(({ hold }) => {
47-
hold(of('src').pipe(tap(spy)));
48-
hold(of('src2'), spy);
49-
});
50-
expect(spy.mock.calls[0][0]).toEqual('src');
51-
expect(spy.mock.calls[1][0]).toEqual('src2');
52-
});*/
53-
5430
it('should connect with slice$', () => {
5531
const { component } = setupComponent<{ count: number }>(({ connect }) =>
5632
connect(of({ count: 10 }))
File renamed without changes.

0 commit comments

Comments
 (0)