<commit_before>
var assert = module.exports = require('assert');

assert.isUser = function (user) {
  assert.isObject(user);
  assert.include(user, 'id');
  assert.include(user, 'name');
  assert.include(user, 'email');
  assert.isArray(user.workspaces);
};

assert.hasNameAndId = function (obj) {
  if (Array.isArray(obj)) {
    return obj.forEach(function (item) {
      assert.hasNameAndId(item);
    });
  }
  
  assert.isObject(obj);
  assert.include(obj, 'id');
  assert.include(obj, 'name');
};

assert.isTask = function (task) {
  assert.isNumber(task.id);
  assert.isArray(task.tags);
  assert.isString(task.created_at);
  assert.isString(task.modified_at);
  assert.isString(task.name);
  assert.isString(task.notes);
  assert.isBoolean(task.completed);
  assert.isString(task.assignee_status);
  assert.isString(task.due_on);
  assert.isArray(task.projects);
  assert.isObject(task.workspace);
  assert.isArray(task.followers);
};<commit_msg>[api test] updated to allow task.due_on to be null<commit_after>
var assert = module.exports = require('assert');

assert.isUser = function (user) {
  assert.isObject(user);
  assert.include(user, 'id');
  assert.include(user, 'name');
  assert.include(user, 'email');
  assert.isArray(user.workspaces);
};

assert.hasNameAndId = function (obj) {
  if (Array.isArray(obj)) {
    return obj.forEach(function (item) {
      assert.hasNameAndId(item);
    });
  }
  
  assert.isObject(obj);
  assert.include(obj, 'id');
  assert.include(obj, 'name');
};

assert.isTask = function (task) {
  assert.isNumber(task.id);
  assert.isArray(task.tags);
  assert.isString(task.created_at);
  assert.isString(task.modified_at);
  assert.isString(task.name);
  assert.isString(task.notes);
  assert.isBoolean(task.completed);
  assert.isString(task.assignee_status);
  assert.isArray(task.projects);
  assert.isObject(task.workspace);
  assert.isArray(task.followers);
  !task.due_on || assert.isString(task.due_on)
};
{'fraction_non_alphanumeric': 0.16547497446373852, 'fraction_numerical': 0.0, 'mean_word_length': 4.778761061946903, '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': '7411288', 'n_tokens_mistral': 688, 'n_tokens_neox': 690, 'n_words': 99}