<commit_before>const { generateRandom } = require('../../server/simulation/drone');

describe('generateRandom()', () => {

  const sampleArguments = {coords: {lat: 1, long: 1}, distance: 1000 };

  test('returns an object', () => {
    expect(
      typeof generateRandom(sampleArguments)
    ).toBe('object');
  });

  test('returns an object with an id', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('id');
  });

  test('returns an object with a model', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('model');
  });

  test('returns an object with an icon property', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('icon');
  });
  
  test('returns an object with coords', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('coords');
  });

  test('returns an object with a missions_completed_7_days attribute', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('missions_completed_7_days');

  });
});<commit_msg>added a test for rating attribute in the simulation.drone.js test spec<commit_after>const { generateRandom } = require('../../server/simulation/drone');

describe('generateRandom()', () => {

  const sampleArguments = {coords: {lat: 1, long: 1}, distance: 1000 };

  test('returns an object', () => {
    expect(
      typeof generateRandom(sampleArguments)
    ).toBe('object');
  });

  test('returns an object with an id', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('id');
  });

  test('returns an object with a model', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('model');
  });

  test('returns an object with an icon property', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('icon');
  });

  test('returns an object with coords', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('coords');
  });

  test('returns an object with a rating attribute', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('icon');
  });

  test('returns an object with a missions_completed_7_days attribute', () => {
    expect(
      generateRandom(sampleArguments)
    ).toHaveProperty('missions_completed_7_days');

  });
});
{'fraction_non_alphanumeric': 0.16098807495741055, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 3.5968688845401173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '912266', 'n_tokens_mistral': 693, 'n_tokens_neox': 656, 'n_words': 152}