{"size": 805, "ext": "js", "max_stars_repo_path": "test/newline.js", "max_stars_repo_name": "hyunchel/melon-chart-api", "max_stars_repo_stars_event_min_datetime": "2017-08-16T15:36:54.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-02T05:12:21.000Z", "max_issues_repo_path": "test/newline.js", "max_issues_repo_name": "hyunchel/melon-chart-api", "max_issues_repo_issues_event_min_datetime": "2017-04-22T03:39:55.000Z", "max_issues_repo_issues_event_max_datetime": "2017-09-27T13:30:28.000Z", "max_forks_repo_path": "test/newline.js", "max_forks_repo_name": "h-yeon/melon-chart-api", "max_forks_repo_forks_event_min_datetime": "2017-05-30T19:38:03.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-13T02:02:24.000Z"}
{"max_stars_count": 22, "max_issues_count": 4, "max_forks_count": 8, "avg_line_length": 30.9615384615, "max_line_length": 69, "alphanum_fraction": 0.698136646}
import test from 'ava';
import Melon from '..';
import JSON_WEEK_OF_2017_06_06 from './week_of_2017_06_06.json';
import JSON_MONTH_OF_2017_06_06 from './month_of_2017_06_06.json';

const options = {
  date: '2017/06/06',
  cutLine: 50,
};
const melon = Melon(options.date, options);

// NOTE: Dates are not needed for daily chart
//       as Melon Music Chart does not provide previous daily charts.
//       Daily chart will always fetch today's chart.
test('content - daily', t => melon.daily().then((chart) => {
  t.notDeepEqual(chart, JSON_WEEK_OF_2017_06_06);
}));

test('content - weekly', t => melon.weekly().then((chart) => {
  t.deepEqual(chart, JSON_WEEK_OF_2017_06_06);
}));

test('content - monthly', t => melon.monthly().then((chart) => {
  t.deepEqual(chart, JSON_MONTH_OF_2017_06_06);
}));
