Skip to content

Commit

Permalink
test(switchScan): fix types after rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsik committed Apr 8, 2020
1 parent 9ea12f9 commit 091ac29
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions spec/operators/switchScan-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('switchScan', () => {
const e1subs = '^ ! ';
const expected = '-----------a--b--c----f---g---h---i--|';

const observableLookup = { x, y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand Down Expand Up @@ -93,7 +93,7 @@ describe('switchScan', () => {
const unsub = ' ! ';
const expected = '-----------a--b--c---- ';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -113,7 +113,7 @@ describe('switchScan', () => {
const expected = '-----------a--b--c---- ';
const unsub = ' ! ';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(
mergeMap(x => of(x)),
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('switchScan', () => {
const e1subs = '^ ! ';
const expected = '-----------a--b--c----f---g---h---i--';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -180,7 +180,7 @@ describe('switchScan', () => {
const e1subs = '^ !';
const expected = '------------f---g---h---i----|';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -199,7 +199,7 @@ describe('switchScan', () => {
const e1subs = '^ ! ';
const expected = '-----------a--b--# ';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -218,7 +218,7 @@ describe('switchScan', () => {
const e1subs = '^ ! ';
const expected = '-----------c--d--e----f---g---h---i--|';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -237,7 +237,7 @@ describe('switchScan', () => {
const e1subs = '^ !';
const expected = '-----------------------------|';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -256,7 +256,7 @@ describe('switchScan', () => {
const e1subs = '^ !';
const expected = '------------------------------';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -275,7 +275,7 @@ describe('switchScan', () => {
const e1subs = '^ !';
const expected = '-----------------------------|';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -287,14 +287,14 @@ describe('switchScan', () => {

it('should switch inner never and throw', () => {
const x = cold('-');
const y = cold('#', null, 'sad');
const y = cold('#', undefined, 'sad');
const xsubs = ' ^ ! ';
const ysubs = ' (^!) ';
const e1 = hot('---------x---------y---------|');
const e1subs = '^ ! ';
const expected = '-------------------# ';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand All @@ -306,14 +306,14 @@ describe('switchScan', () => {

it('should switch inner empty and throw', () => {
const x = cold('|');
const y = cold('#', null, 'sad');
const y = cold('#', undefined, 'sad');
const xsubs = ' (^!) ';
const ysubs = ' (^!) ';
const e1 = hot('---------x---------y---------|');
const e1subs = '^ ! ';
const expected = '-------------------# ';

const observableLookup = { x: x, y: y };
const observableLookup: Record<string, Observable<string>> = { x, y };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand Down Expand Up @@ -363,7 +363,7 @@ describe('switchScan', () => {
const e1subs = '^ ! ';
const expected = '-----------a--b--c-# ';

const observableLookup = { x: x };
const observableLookup: Record<string, Observable<string>> = { x: x };

const result = e1.pipe(switchScan((acc, value) => observableLookup[value], null));

Expand Down

0 comments on commit 091ac29

Please sign in to comment.