<commit_before>'use strict'

const path = require('path')
const assert = require('assert-plus')
const analyze = require('..')

describe('parse test', function () {
  it('should parse javascript', function () {
    let content = `
'use strict'

import './aaa.scss'

const xxx = require('bbb')

require.resolve('../ccc.js')
`

    let deps = analyze.parseJS(content)
    assert.deepEqual(deps, [
      './aaa.scss',
      'bbb',
      '../ccc.js'
    ])
  })

  it('should parse css', function () {
    let content = `
@import "aaa.scss", "bbb.scss", 'ccc.scss';

@import "./ddd.scss";

// @import "./eee.scss";

/* @import "./fff.scss" */
`
    let deps = analyze.parseCSS(content)
    assert.deepEqual(deps, [
      'aaa.scss',
      'bbb.scss',
      'ccc.scss',
      './ddd.scss'
    ])
  })

  it('should parse file', function () {<commit_msg>test: add react node support<commit_after>'use strict'

const path = require('path')
const assert = require('assert-plus')
const analyze = require('..')

describe('parse test', function () {
  it('should parse javascript', function () {
    let content = `
'use strict'

import './aaa.scss'

const xxx = require('bbb')

require.resolve('../ccc.js')

const tpl = () => (
  <ReactNode></ReactNode>
)
`

    let deps = analyze.parseJS(content)
    assert.deepEqual(deps, [
      './aaa.scss',
      'bbb',
      '../ccc.js'
    ])
  })

  it('should parse css', function () {
    let content = `
@import "aaa.scss", "bbb.scss", 'ccc.scss';

@import "./ddd.scss";

// @import "./eee.scss";

/* @import "./fff.scss" */
`
    let deps = analyze.parseCSS(content)
    assert.deepEqual(deps, [
      'aaa.scss',
      'bbb.scss',
      'ccc.scss',
      './ddd.scss'
    ])
  })

  it('should parse file', function () {
{'fraction_non_alphanumeric': 0.20420932878270762, 'fraction_numerical': 0.0, 'mean_word_length': 2.6876310272536688, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6770908', 'n_tokens_mistral': 664, 'n_tokens_neox': 641, 'n_words': 133}