<commit_before>var test = require('tape')
  , fs = require('fs')
  , path = require('path')
  , css = require('./')
  , cssFixtures = __dirname + '/test/fixtures/css/'
  , lessFixtures = __dirname + '/test/fixtures/less/'

test('basic css bundling', function (t) {
  t.plan(1)

  var cfg = { entry: path.join(cssFixtures, 'entry.css') }
    , correct = fs.readFileSync(path.join(cssFixtures, 'bundle.css'), 'utf8')

  css(cfg, function (err, src) {
    t.equal(src, correct)
  })
})

test('basic multiple css bundling', function (t) {
    t.plan(1)

    var cfg = { entries: [ path.join(cssFixtures, 'entry.css'), path.join(cssFixtures, 'entry-multi.css')]  }
        , correct = fs.readFileSync(path.join(cssFixtures, 'bundle-multi.css'), 'utf8')

    css(cfg, function (err, src) {
        t.equal(src, correct)
    })
})


test('compiles variables', function (t){
  t.plan(2)

  var cfg = { entry: path.join(cssFixtures, 'vars.css') }
    , correct = fs.readFileSync(path.join(cssFixtures, 'varBundle.css'), 'utf8').replace(/[\n]$/, '')

  css(cfg, function (err, src) {
    t.error(err, 'does not error')
    t.equal(src, correct, 'compiles the correct css')
  })
})


test('css bundling with variables', function (t) {
    t.plan(1)

    var cfg = { entries: [ path.join(cssFixtures, 'entry-with-var.css') ],
            variables: {
                mainColor: '#4170BB',
                headerColor: '#4170CC'
            }
        }
        , correct = fs.readFileSync(path.join(cssFixtures, 'bundle-with-var.css'), 'utf8')

    css(cfg, function (err, src) {
        t.equal(src, correct)
    })
})

test.only('css bundling with variables from a json file', function (t) {
    t.plan(1)

    var cfg = { entries: [ path.join(cssFixtures, 'entry-with-var.css') ],
            variables: path.join(cssFixtures, 'variables.json')
        }
        , correct = fs.readFileSync(path.join(cssFixtures, 'bundle-with-var.css'), 'utf8')

    css(cfg, function (err, src) {
        t.equal(src, correct)
    })
})

test('basic less bundling', function (t) {
  t.plan(1)

  var cfg = { entry: path.join(lessFixtures, 'entry.less') }
    , correct = fs.readFileSync(path.join(lessFixtures, 'bundle.css'), 'utf8')

  css(cfg, function (err, src) {
    t.equal(src, correct)
  })
})

test('less bundling with module name', function (t) {
  t.plan(1)
<commit_msg>- fix for test, removing tabulations<commit_after>var test = require('tape')
  , fs = require('fs')
  , path = require('path')
  , css = require('./')
  , cssFixtures = __dirname + '/test/fixtures/css/'
  , lessFixtures = __dirname + '/test/fixtures/less/'

test('basic css bundling', function (t) {
  t.plan(1)

  var cfg = { entry: path.join(cssFixtures, 'entry.css') }
    , correct = fs.readFileSync(path.join(cssFixtures, 'bundle.css'), 'utf8')

  css(cfg, function (err, src) {
    t.equal(src, correct)
  })
})

test('basic multiple css bundling', function (t) {
    t.plan(1)

    var cfg = { entries: [ path.join(cssFixtures, 'entry.css'), path.join(cssFixtures, 'entry-multi.css')]  }
        , correct = fs.readFileSync(path.join(cssFixtures, 'bundle-multi.css'), 'utf8')

    css(cfg, function (err, src) {
        t.equal(src, correct)
    })
})


test('compiles variables', function (t){
  t.plan(2)

  var cfg = { entry: path.join(cssFixtures, 'vars.css') }
    , correct = fs.readFileSync(path.join(cssFixtures, 'varBundle.css'), 'utf8').replace(/[\n]$/, '')

  css(cfg, function (err, src) {
    t.error(err, 'does not error')
    t.equal(src, correct, 'compiles the correct css')
  })
})


test('css bundling with variables', function (t) {
    t.plan(1)

    var cfg = { entries: [ path.join(cssFixtures, 'entry-with-var.css') ],
            variables: {
                mainColor: '#4170BB',
                headerColor: '#4170CC'
            }
        }
        , correct = fs.readFileSync(path.join(cssFixtures, 'bundle-with-var.css'), 'utf8')

    css(cfg, function (err, src) {
        t.equal(src, correct)
    })
})

test('css bundling with variables from a json file', function (t) {
    t.plan(1)

    var cfg = { entries: [ path.join(cssFixtures, 'entry-with-var.css') ],
            variables: path.join(cssFixtures, 'variables.json')
        }
        , correct = fs.readFileSync(path.join(cssFixtures, 'bundle-with-var.css'), 'utf8')

    css(cfg, function (err, src) {
        t.equal(src, correct)
    })
})

test('basic less bundling', function (t) {
  t.plan(1)

  var cfg = { entry: path.join(lessFixtures, 'entry.less') }
    , correct = fs.readFileSync(path.join(lessFixtures, 'bundle.css'), 'utf8')

  css(cfg, function (err, src) {
    t.equal(src, correct)
  })
})

test('less bundling with module name', function (t) {
  t.plan(1)

{'fraction_non_alphanumeric': 0.179492600422833, 'fraction_numerical': 0.008879492600422832, 'mean_word_length': 3.009322033898305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1926983', 'n_tokens_mistral': 1700, 'n_tokens_neox': 1658, 'n_words': 351}