<commit_before>var test = require('tape')
var error = require('../')

test('message', function(t) {
  t.plan(3)
  var MyError = error('MyError')
  t.equals(MyError().name, 'MyError', 'name should be correct')
  t.equals(MyError('rawr').message, 'rawr', 'message should be correct')

  t.ok(
    /^MyError: meh/.test(MyError('meh').stack),
    'stack should contain name and message'
  )
})<commit_msg>Change message test to be more readable on errors<commit_after>var test = require('tape')
var error = require('../')

test('message', function(t) {
  t.plan(3)
  var MyError = error('MyError')
  t.equals(MyError().name, 'MyError', 'name should be correct')
  t.equals(MyError('rawr').message, 'rawr', 'message should be correct')

  t.equals(MyError('meh').stack.split('\n')[0], 'MyError: meh', 'stack should contain name and message')
})
{'fraction_non_alphanumeric': 0.18951132300357568, 'fraction_numerical': 0.003575685339690107, 'mean_word_length': 4.874125874125874, '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': '4962096', 'n_tokens_mistral': 289, 'n_tokens_neox': 287, 'n_words': 74}