{"size": 608, "ext": "js", "max_stars_repo_path": "packages/lint/test/contentRuleTest.js", "max_stars_repo_name": "takuto-y/the", "max_stars_repo_stars_event_min_datetime": "2019-03-17T12:52:00.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-14T17:29:44.000Z", "max_issues_repo_path": "packages/lint/test/contentRuleTest.js", "max_issues_repo_name": "takuto-y/the", "max_issues_repo_issues_event_min_datetime": "2019-05-15T08:51:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-08T22:40:28.000Z", "max_forks_repo_path": "packages/lint/test/contentRuleTest.js", "max_forks_repo_name": "takuto-y/the", "max_forks_repo_forks_event_min_datetime": "2019-05-20T09:00:31.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-18T05:42:57.000Z"}
{"max_stars_count": 8, "max_issues_count": 46, "max_forks_count": 4, "avg_line_length": 16.4324324324, "max_line_length": 55, "alphanum_fraction": 0.5115131579}
'use strict'

/**
 * Test for contentRule.
 * Runs with mocha.
 */
const {
  strict: { equal },
} = require('assert')
const contentRule = require('../lib/rules/contentRule')

describe('content-rule', () => {
  before(() => {})

  after(() => {})

  it('Do test', async () => {
    const reported = []
    await contentRule({
      endsWithNewLine: true,
      maxLines: 3,
    })({
      content: `hoge
      fuge
      l2
      l3`,
      filename: 'hoge.js',
      report: (...a) => {
        reported.push(a)
      },
    })
    equal(reported.length, 2)
  })
})

/* global describe, before, after, it */
