module.exports = function (data) {
  var assertions = [
    'ok', 'equal', 'notEqual',
    'propEqual', 'notPropEqual',
    'deepEqual', 'notDeepEqual',
    'strictEqual', 'notStrictEqual',
    'throws', 'expect'
  ];
  var assertPrefix = 'assert.';
  var result = data;

  assertions.map(function (assertion) {
    var regex = new RegExp('\^' + assertion + '\\(', 'g');
    var replacement = assertPrefix + assertion + '(';
    result = result.replace(regex, replacement);
  });

  return result;
}

module.exports = function (data) {
  var assertions = [
    'ok', 'equal', 'notEqual',
    'propEqual', 'notPropEqual',
    'deepEqual', 'notDeepEqual',
    'strictEqual', 'notStrictEqual',
    'throws', 'expect'
  ];
  var assertPrefix = 'assert.';
  var result = data;

  assertions.map(function (assertion) {
    var regex = new RegExp('\^' + assertion + '\\(', 'g');
    var replacement = assertPrefix + assertion + '(';
    result = result.split('\n').map(function (x) {
      return x.replace(regex, replacement);
    }).join('\n');
  });

  return result;
}

Make assertion tester more robust
Make assertion tester more robust
