<commit_before>import testRule from 'stylelint-test-rule-tape'

import declarationStrictValue, { ruleName } from '../src'

const { rule } = declarationStrictValue

// ignore keywords hash
testRule(rule, {
  ruleName,
  skipBasicChecks: true,

  config: [['/color$/', 'fill', 'z-index'], {
    ignoreValues: {
      '/color$/': ['transparent', '/^red$/i'],
      'fill': 'inherit',
      'z-index': '/^\\d+$/',
    },
  }],

  accept: [
    { code: '.foo { color: transparent; }' },
    { code: '.foo { color: red; }' },
    { code: '.foo { color: RED; }' },
    { code: '.foo { background-color: transparent; }' },
    { code: '.foo { background-color: red; }' },
    { code: '.foo { background-color: RED; }' },
    { code: '.foo { border-color: transparent; }' },
    { code: '.foo { border-color: red; }' },
    { code: '.foo { border-color: RED; }' },
    { code: '.foo { fill: inherit; }' },
    { code: '.foo { z-index: 0; }' },
    { code: '.foo { z-index: 1000; }' },
  ],

  reject: [
    {
      code: '.foo { color: inherit; }',
      message: `Expected variable, function or keyword for "inherit" of "color" (${ruleName})`,
      line: 1,
      column: 8,
    },
    {
      code: '.foo { fill: currentColor; }',
      message: `Expected variable, function or keyword for "currentColor" of "fill" (${ruleName})`,
      line: 1,
      column: 8,
    },
    {
      code: '.foo { z-index: foo; }',
      message: `Expected variable, function or keyword for "foo" of "z-index" (${ruleName})`,
      line: 1,
      column: 8,
    },
  ],
})<commit_msg>test: fix coverage of value hash<commit_after>import testRule from 'stylelint-test-rule-tape'

import declarationStrictValue, { ruleName } from '../src'

const { rule } = declarationStrictValue

// ignore keywords hash
testRule(rule, {
  ruleName,
  skipBasicChecks: true,

  config: [['/color$/', 'fill', 'z-index', 'display'], {
    ignoreValues: {
      '/color$/': ['transparent', '/^red$/i'],
      'fill': 'inherit',
      'z-index': '/^\\d+$/',
      '': 'initial',
    },
  }],

  accept: [
    { code: '.foo { color: transparent; }' },
    { code: '.foo { color: red; }' },
    { code: '.foo { color: RED; }' },
    { code: '.foo { background-color: transparent; }' },
    { code: '.foo { background-color: red; }' },
    { code: '.foo { background-color: RED; }' },
    { code: '.foo { border-color: transparent; }' },
    { code: '.foo { border-color: red; }' },
    { code: '.foo { border-color: RED; }' },
    { code: '.foo { fill: inherit; }' },
    { code: '.foo { z-index: 0; }' },
    { code: '.foo { z-index: 1000; }' },
    { code: '.foo { display: initial; }' },
  ],

  reject: [
    {
      code: '.foo { color: inherit; }',
      message: `Expected variable, function or keyword for "inherit" of "color" (${ruleName})`,
      line: 1,
      column: 8,
    },
    {
      code: '.foo { fill: currentColor; }',
      message: `Expected variable, function or keyword for "currentColor" of "fill" (${ruleName})`,
      line: 1,
      column: 8,
    },
    {
      code: '.foo { z-index: foo; }',
      message: `Expected variable, function or keyword for "foo" of "z-index" (${ruleName})`,
      line: 1,
      column: 8,
    },
    {
      code: '.foo { display: block; }',
      message: `Expected variable, function or keyword for "block" of "display" (${ruleName})`,
      line: 1,
      column: 8,
    },
  ],
})
{'fraction_non_alphanumeric': 0.21054181389870436, 'fraction_numerical': 0.007067137809187279, 'mean_word_length': 2.4522357723577235, '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': '7088350', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1157, 'n_words': 306}