All files / packages/design-tokens/src/validators run-permanent-validators.js

100% Statements 7/7
50% Branches 1/2
100% Functions 3/3
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34              9x                         9x 38x   9x 3x               9x  
#!/usr/bin/env node
/**
 * Permanent Validator Runner - Run validators that should always pass in production
 * Usage: yarn validate:permanent [--verbose|-v] [--interactive|-i]
 */
import { createRunner, printBasicSummary, v, runMain } from './validator-runner-utils.js';
 
const VALIDATORS = [
  v(
    'Cross-Platform Color Validation',
    'cross-platform-colors.js',
    'Validate color consistency across CSS, Android, and iOS',
  ),
  v(
    'Theme Parity Validation',
    'theme-parity.js',
    'Validate that Cosmos and SLDS themes contain the same token keys',
  ),
];
 
export const getValidators = (verboseFlag = '') =>
  VALIDATORS.map((val) => ({ ...val, args: val.args(verboseFlag) }));
 
export const main = (options = {}) =>
  createRunner({
    title: 'Running Permanent Validators',
    description: 'These validators ensure production-ready token quality.',
    getValidators,
    printSummary: printBasicSummary,
    ...options,
  });
 
runMain(main, import.meta.url);