"use strict";

var _index = require("../../index");

describe('replacing schema value by customOptions from number to other data types', () => {
  const schema = {
    firstData: 28
  };
  const processEnv = {};
  it('to string', () => {
    const customOptions = {
      firstData: 'ONE'
    };
    const output = (0, _index.applyValuesToSchema)(schema, customOptions, processEnv);
    expect(output).toStrictEqual({
      firstData: 'ONE'
    });
  });
  it('to array', () => {
    const customOptions = {
      firstData: [1, 2, 3]
    };
    const output = (0, _index.applyValuesToSchema)(schema, customOptions, processEnv);
    expect(output).toStrictEqual({
      firstData: [1, 2, 3]
    });
  });
  it('to object', () => {
    const customOptions = {
      firstData: {
        Good: 'Morning'
      }
    };
    const output = (0, _index.applyValuesToSchema)(schema, customOptions, processEnv);
    expect(output).toStrictEqual({
      firstData: {
        Good: 'Morning'
      }
    });
  });
  it('to  null', () => {
    const customOptions = {
      firstData: null
    };
    const output = (0, _index.applyValuesToSchema)(schema, customOptions, processEnv);
    expect(output).toStrictEqual({
      firstData: 28
    });
  });
  it('to  undefined', () => {
    const customOptions = {
      firstData: undefined
    };
    const output = (0, _index.applyValuesToSchema)(schema, customOptions, processEnv);
    expect(output).toStrictEqual({
      firstData: 28
    });
  });
  it('to NaN', () => {
    const customOptions = {
      firstData: NaN
    };
    const output = (0, _index.applyValuesToSchema)(schema, customOptions, processEnv);
    expect(output).toStrictEqual({
      firstData: 28
    });
  });
});