<commit_before>/*jslint indent:2*/
/*global require: true, console: true */
var GoogleContacts = require('../').GoogleContacts;
var assert = require('assert');
var contactsTested = false;
var contactTested = false;
var contactCreated = false;

var c = new GoogleContacts({
  token: process.env.GOOGLE_TOKEN
});

c.getContacts(function (err, contacts) {
  if (err) throw err;
  assert.ok(typeof contacts === 'object', 'Contacts is not an object');
  console.log(contacts);
  contactsTested = true;
});

c.getContact(function (err, contact) {
  if (err) throw err;
  assert.ok(typeof contact === 'object', 'Contact is not an object');
  console.log(contact);
  contactTested = true;
}, {id: process.env.GOOGLE_CONTACT_ID});

var contactToCreate = {
  entry: {
    name: {
      fullName: '<NAME>'
    },
    email: [{
      primary: true,
      address: '<EMAIL>',
      type: 'home'
    }],
    phoneNumber: [{
      type: 'work',
      phoneNumber: '555555555'
    }]
  }
};

c.createContact(function (err, contact) {
  if (err) throw err;
  assert.ok(typeof contact === 'object', 'Contact is not an object');
  contactCreated = true;
}, contactToCreate);


process.on('exit', function () {
  if (!contactsTested || !contactTested || !contactCreated) {
    throw new Error('contact test failed');
  }
});<commit_msg>Enhancement: removing unnecesary console.logs<commit_after>/*jslint indent:2*/
/*global require: true, console: true */
var GoogleContacts = require('../').GoogleContacts;
var assert = require('assert');
var contactsTested = false;
var contactTested = false;
var contactCreated = false;

var c = new GoogleContacts({
  token: process.env.GOOGLE_TOKEN
});

c.getContacts(function (err, contacts) {
  if (err) throw err;
  assert.ok(typeof contacts === 'object', 'Contacts is not an object');
  contactsTested = true;
});

c.getContact(function (err, contact) {
  if (err) throw err;
  assert.ok(typeof contact === 'object', 'Contact is not an object');
  contactTested = true;
}, {id: process.env.GOOGLE_CONTACT_ID});

var contactToCreate = {
  entry: {
    name: {
      fullName: '<NAME>'
    },
    email: [{
      primary: true,
      address: '<EMAIL>',
      type: 'home'
    }],
    phoneNumber: [{
      type: 'work',
      phoneNumber: '555555555'
    }]
  }
};

c.createContact(function (err, contact) {
  if (err) throw err;
  assert.ok(typeof contact === 'object', 'Contact is not an object');
  contactCreated = true;
}, contactToCreate);


process.on('exit', function () {
  if (!contactsTested || !contactTested || !contactCreated) {
    throw new Error('contact test failed');
  }

  console.log("all tests passed");
});
{'fraction_non_alphanumeric': 0.15918521312712183, 'fraction_numerical': 0.007544322897019992, 'mean_word_length': 3.8043478260869565, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2522585', 'n_tokens_mistral': 877, 'n_tokens_neox': 860, 'n_words': 230}