<commit_before>const postcss = require('postcss');
const test = require('ava');
const plugin = require('./index');


function run(t, input, output, opts = { }) {
  return postcss([ plugin(opts) ]).process(input)
        .then( result => {
          t.is(result.css, output);
          t.is(result.warnings().length, 0);
        });
}

test('should remove properties that match a regex', t => {
  const input =
  `body {
      font-family: 'Helvetica';
      fOnt-size: 'Helvetica';
   }`;

  const output =
  `body {
   }`;

  const opts = {
    rules: [{
      prop: /font/gi
    }]
  };

  return run(t, input, output, opts);
});
<commit_msg>fix postcss warning in test file<commit_after>const postcss = require('postcss');
const test = require('ava');
const plugin = require('./index');


function run(t, input, output, opts = { }) {
  return postcss([ plugin(opts) ]).process(input, { from: undefined })
        .then( result => {
          t.is(result.css, output);
          t.is(result.warnings().length, 0);
        });
}

test('should remove properties that match a regex', t => {
  const input =
  `body {
      font-family: 'Helvetica';
      fOnt-size: 'Helvetica';
   }`;

  const output =
  `body {
   }`;

  const opts = {
    rules: [{
      prop: /font/gi
    }]
  };

  return run(t, input, output, opts);
});

{'fraction_non_alphanumeric': 0.17620481927710843, 'fraction_numerical': 0.0015060240963855422, 'mean_word_length': 2.591891891891892, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2023878', 'n_tokens_mistral': 454, 'n_tokens_neox': 441, 'n_words': 111}