{"size": 805, "ext": "js", "max_stars_repo_path": "tests/repositories/ExchangePriceRepo/PriceRepoKraken.test.js", "max_stars_repo_name": "vaporyorg/dx-services", "max_stars_repo_stars_event_min_datetime": "2018-05-19T15:58:00.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-23T18:49:05.000Z", "max_issues_repo_path": "tests/repositories/ExchangePriceRepo/PriceRepoKraken.test.js", "max_issues_repo_name": "vaporyorg/dx-services", "max_issues_repo_issues_event_min_datetime": "2018-03-13T17:23:14.000Z", "max_issues_repo_issues_event_max_datetime": "2019-12-26T23:12:07.000Z", "max_forks_repo_path": "tests/repositories/ExchangePriceRepo/PriceRepoKraken.test.js", "max_forks_repo_name": "vaporyorg/dx-services", "max_forks_repo_forks_event_min_datetime": "2018-06-14T15:33:03.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-28T12:18:48.000Z"}
{"max_stars_count": 29, "max_issues_count": 68, "max_forks_count": 16, "avg_line_length": 38.3333333333, "max_line_length": 92, "alphanum_fraction": 0.6695652174}
const PriceRepoKraken = require('../../../src/repositories/PriceRepo/feeds/PriceRepoKraken')
const priceRepo = new PriceRepoKraken({})

test.skip('It should return a price for known Crypto markets', async () => {
  jest.setTimeout(10000)
  expect.assertions(3)
  expect(await priceRepo.getPrice({tokenA: 'ETH', tokenB: 'XBT'})).toMatch(/\d*\.?\d+/)
  expect(await priceRepo.getPrice({tokenA: 'ETH', tokenB: 'USD'})).toMatch(/\d*\.?\d+/)
  expect(await priceRepo.getPrice({tokenA: 'XDG', tokenB: 'XBT'})).toMatch(/\d*\.?\d+/)
})

test.skip('It should throw an error for unknown Crypto markets', async () => {
  jest.setTimeout(10000)
  expect.assertions(1)
  try {
    await priceRepo.getPrice({tokenA: 'XBT', tokenB: 'OMG'})
  } catch (e) {
    expect(e).toEqual(Error('Query:Unknown asset pair'))
  }
})
