Commit 9db36478 authored by Ricardo Javier Barrios Díaz's avatar Ricardo Javier Barrios Díaz
Browse files

feat(values): rewrite and refactor

parent 9602b8fd
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
import { EMPTY, Observable, of } from 'rxjs';
import { async } from 'rxjs/internal/scheduler/async';
import { combine } from '../combine/combine.function';
import { asyncScheduler, EMPTY, Observable, of as just } from 'rxjs';

import { combine } from '../combine/combine';
import { KeyValue } from '../typings/key-value.interface';

// tslint:disable:no-commented-code
// tslint:disable:no-construct
// tslint:disable:use-primitive-type
// tslint:disable:no-magic-numbers
// tslint:disable:ban-types
// tslint:disable:id-length
// tslint:disable:prefer-array-literal
// tslint:disable:typedef
// tslint:disable:no-empty
// tslint:disable:ban-types

/**
 * Boolean test values
@@ -100,12 +105,12 @@ export const objectValues: KeyValue<{}> = {
/**
 * Maximum allowed Date value
 */
export const maxDateValue = 8640000000000000;
export const maxDateValue: number = 8640000000000000;

/**
 * Minimum allowed Date value
 */
export const minDateValue = -8640000000000000;
export const minDateValue: number = -8640000000000000;

/**
 * Date test values
@@ -130,6 +135,7 @@ export const errorValues: KeyValue<Error> = {
export const arrayValues: KeyValue<any[]> = {
  array_object: [1, 'a', true, {}, [], undefined, null],
  array_object_nullish_empty: [],

  array_object_nullish_empty_constructor: new Array()
};

@@ -166,6 +172,7 @@ export const regexpValues: KeyValue<RegExp> = {
/**
 * Function test values
 */

export const functionValues: KeyValue<Function> = {
  function_basic: () => 'a',
  function_nullish_empty() {},
@@ -177,8 +184,8 @@ export const functionValues: KeyValue<Function> = {
 * Observable like test values
 */
export const observableValues: KeyValue<Observable<any>> = {
  observable_object_subscribable_async: of(1, async),
  observable_object_subscribable_sync: of(1),
  observable_object_subscribable_async: just(1, asyncScheduler),
  observable_object_subscribable_sync: just(1),
  observable_object_subscribable_nullish_empty: EMPTY
};