<commit_before>jest.doMock('path', () => ({ }))
jest.doMock('../node.js', () => require('../browser'))

var browserslist = require('../')

it('works without path', () => {
  expect(browserslist(undefined)).toEqual(browserslist('defaults'))
})

it('works with input file without path', () => {
  expect(browserslist(undefined, { path: './fixtures/rc/test.css' }))
    .toEqual(browserslist('defaults'))
})

it('throws on sharable config', () => {
  expect(() => {
    browserslist('extends browserslist-config-test')
  }).toThrowError(/Sharable configs are not supported/)
})

it('throws on country statistics', () => {
  expect(() => {
    browserslist('> 1% in US')
  }).toThrowError(/Country statistics is not supported/)
})

it('throws on config path', () => {
  expect(() => {
    browserslist(undefined, { config: './config/.browserslistrc' })
  }).toThrowError(/Browserslist config are not supported/)
})<commit_msg>Increase test coverage by functions<commit_after>jest.doMock('path', () => ({ }))
jest.doMock('../node.js', () => require('../browser'))

var browserslist = require('../')

it('works without path', () => {
  expect(browserslist(undefined)).toEqual(browserslist('defaults'))
})

it('works with input file without path', () => {
  expect(browserslist(undefined, { path: './fixtures/rc/test.css' }))
    .toEqual(browserslist('defaults'))
})

it('throws on sharable config', () => {
  expect(() => {
    browserslist('extends browserslist-config-test')
  }).toThrowError(/Sharable configs are not supported/)
})

it('throws on country statistics', () => {
  expect(() => {
    browserslist('> 1% in US')
  }).toThrowError(/Country statistics is not supported/)
})

it('throws on config path', () => {
  expect(() => {
    browserslist(undefined, { config: './config/.browserslistrc' })
  }).toThrowError(/Browserslist config are not supported/)
})

it('has config methods', () => {
  expect(browserslist.clearCaches()).toBeUndefined()
  expect(browserslist.parseConfig('')).toBeUndefined()
  expect(browserslist.readConfig()).toBeUndefined()
  expect(browserslist.findConfig()).toBeUndefined()
})
{'fraction_non_alphanumeric': 0.20756501182033096, 'fraction_numerical': 0.0009456264775413711, 'mean_word_length': 4.76566757493188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 26, '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': '4585815', 'n_tokens_mistral': 674, 'n_tokens_neox': 673, 'n_words': 129}