<commit_before>import getUnixTime from 'date-fns/getUnixTime';
import numericHash from 'string-hash';

import { State } from '~client/reducers/funds';
import type { FundNative } from '~client/types';

export const testRows: FundNative[] = [
  {
    id: numericHash('some-fund-1'),
    item: 'some fund 1',
    transactions: [
      {
        price: 428,
        units: 934,
        fees: 148,
        taxes: 100,
        date: new Date('2017-05-09'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
  {
    id: numericHash('some-fund-2'),
    item: 'some fund 2',
    transactions: [
      {
        units: 450,
        price: 100,
        fees: 0,
        taxes: 0,
        date: new Date('2017-03-03'),
        drip: false,
        pension: false,
      },
      {
        units: -450,
        price: 112,
        fees: 20,
        taxes: 80,
        date: new Date('2017-04-27'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
  {
    id: numericHash('some-fund-3'),
    item: 'some fund 3',
    transactions: [
      {
        units: 1117.87,
        price: 80.510256,
        fees: 0,
        taxes: 0,
        date: new Date('2017-01-11'),
        drip: false,
        pension: false,
      },
      {
        units: -1117.87,
        price: 72.24453648,
        fees: 0,
        taxes: 0,
        date: new Date('2017-04-27'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
  {
    id: numericHash('some-fund-4'),
    item: 'test fund 4',
    transactions: [
      {
        units: 1499.7,
        price: 133.36,
        fees: 0,
        taxes: 0,
        date: new Date('2016-09-21'),
        drip: false,
        pension: false,
      },
      {
        units: -1499.7,
        price: 177.1167567,
        fees: 0,
        taxes: 0,
        date: new Date('2017-04-27'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
];

export const testPrices: State['prices'] = {
  [numericHash('some-fund-1')]: [
    {
      startIndex: 1,
      values: [176.3, 175],
    },
  ],
  [numericHash('some-fund-2')]: [
    {
      startIndex: 1,
      values: [98.32, 99.29],
    },
  ],
  [numericHash('some-fund-3')]: [
    {
      startIndex: 0,
      values: [8152.18],
    },
    {
      startIndex: 3,
      values: [8114.39],
    },
  ],
  [numericHash('some-fund-4')]: [
    {
      startIndex: 1,
      values: [249.93, 247.5],
    },
  ],
};

export const testStartTime = getUnixTime(new Date('2017-04-25T18:15:39Z'));

export const testCacheTimes = [
  0,
  getUnixTime(new Date('2020-04-20T18:15:39Z')) - testStartTime,
  getUnixTime(new Date('2020-04-20T18:43:19Z')) - testStartTime,
  getUnixTime(new Date('2020-04-26T18:43:19Z')) - testStartTime,
];<commit_msg>chore: updated test funds data<commit_after>import getUnixTime from 'date-fns/getUnixTime';
import numericHash from 'string-hash';

import { State } from '~client/reducers/funds';
import type { FundNative } from '~client/types';

export const testRows: FundNative[] = [
  {
    id: numericHash('some-fund-1'),
    item: 'some fund 1',
    transactions: [
      {
        price: 428,
        units: 934,
        fees: 148,
        taxes: 100,
        date: new Date('2017-05-09'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
  {
    id: numericHash('some-fund-2'),
    item: 'some fund 2',
    transactions: [
      {
        units: 450,
        price: 100,
        fees: 0,
        taxes: 0,
        date: new Date('2017-03-03'),
        drip: false,
        pension: false,
      },
      {
        units: -450,
        price: 112,
        fees: 20,
        taxes: 80,
        date: new Date('2017-04-27'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
  {
    id: numericHash('some-fund-3'),
    item: 'some fund 3',
    transactions: [
      {
        units: 1117.87,
        price: 80.510256,
        fees: 0,
        taxes: 0,
        date: new Date('2017-01-11'),
        drip: false,
        pension: false,
      },
      {
        units: -1117.87,
        price: 72.24453648,
        fees: 0,
        taxes: 0,
        date: new Date('2017-04-27'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
  {
    id: numericHash('some-fund-4'),
    item: 'test fund 4',
    transactions: [
      {
        units: 1499.7,
        price: 133.36,
        fees: 0,
        taxes: 0,
        date: new Date('2016-09-21'),
        drip: false,
        pension: false,
      },
      {
        units: -1499.7,
        price: 177.1167567,
        fees: 0,
        taxes: 0,
        date: new Date('2017-04-27'),
        drip: false,
        pension: false,
      },
    ],
    stockSplits: [],
    allocationTarget: 0,
  },
];

export const testPrices: State['prices'] = {
  [numericHash('some-fund-1')]: [
    {
      startIndex: 1,
      values: [476.3, 475],
    },
  ],
  [numericHash('some-fund-2')]: [
    {
      startIndex: 1,
      values: [98.32, 99.29],
    },
  ],
  [numericHash('some-fund-3')]: [
    {
      startIndex: 0,
      values: [8152.18],
    },
    {
      startIndex: 2,
      values: [8114.39],
    },
  ],
  [numericHash('some-fund-4')]: [
    {
      startIndex: 1,
      values: [249.93, 247.5],
    },
  ],
};

export const testStartTime = getUnixTime(new Date('2017-04-25T18:15:39Z'));

export const testCacheTimes = [
  0,
  getUnixTime(new Date('2020-04-20T18:15:39Z')) - testStartTime,
  getUnixTime(new Date('2020-04-20T18:43:19Z')) - testStartTime,
];
{'fraction_non_alphanumeric': 0.16035136066138478, 'fraction_numerical': 0.08818463658284534, 'mean_word_length': 1.731420507996237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1757594', 'n_tokens_mistral': 2411, 'n_tokens_neox': 2110, 'n_words': 431}