<commit_before>#!/usr/bin/env node

let ciJobNumber = require('ci-job-number')
let real = require('postcss-parser-tests/real')

let Processor = require('../lib/processor')
let postcss = require('../')
let pkg = require('../package')

if (ciJobNumber() === 1) {
  let instance = new Processor()
  if (pkg.version !== instance.version) {
    throw new Error('Version in Processor is not equal to package.json')
  }

  real(error => {
    if (error) throw error
  }, css => {
    return postcss.parse(css).toResult({ map: { annotation: false } })
  })
}<commit_msg>Improve error message in integration test<commit_after>#!/usr/bin/env node

let ciJobNumber = require('ci-job-number')
let chalk = require('chalk')
let real = require('postcss-parser-tests/real')

let Processor = require('../lib/processor')
let postcss = require('../')
let pkg = require('../package')

if (ciJobNumber() === 1) {
  let instance = new Processor()
  if (pkg.version !== instance.version) {
    throw new Error('Version in Processor is not equal to package.json')
  }

  real(error => {
    if (error) {
      process.stderr.write(chalk.red(error.toString()) + '\n')
      process.exit(1)
    }
  }, css => {
    return postcss.parse(css).toResult({ map: { annotation: false } })
  })
}
{'fraction_non_alphanumeric': 0.17591125198098256, 'fraction_numerical': 0.002377179080824089, 'mean_word_length': 3.6094890510948905, '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': '7278270', 'n_tokens_mistral': 417, 'n_tokens_neox': 403, 'n_words': 105}