<commit_before>// 9: object-literals - basics
// To do: make all tests pass, leave the assert lines unchanged!

describe('new shorthands for objects', () => {

  const x = 1;
  const y = 2;

  describe('with variables', () => {
    it('use the variables name as key', () => {
      const short = {x};
      assert.deepEqual(short, {y: y});
    });
    it('works with many too', () => {
      const short = {x, y: z};
      assert.deepEqual(short, {x: x, y: y});
    });
  });
  
  describe('with methods', () => {
    
    const func = () => func;

    it('uses its name', () => {
      const short = {it};
      assert.deepEqual(short, {func: func});
    });
    
    it('different key must be given explicitly, just like before ES6', () => {
      const short = {func};
      assert.deepEqual(short, {otherKey: func});
    });
    
    it('no need for `function(){}`', () => {<commit_msg>Better description for last test.<commit_after>// 9: object-literals - basics
// To do: make all tests pass, leave the assert lines unchanged!

describe('new shorthands for objects', () => {

  const x = 1;
  const y = 2;

  describe('with variables', () => {
    it('use the variables name as key', () => {
      const short = {x};
      assert.deepEqual(short, {y: y});
    });
    it('works with many too', () => {
      const short = {x, y: z};
      assert.deepEqual(short, {x: x, y: y});
    });
  });
  
  describe('with methods', () => {
    
    const func = () => func;

    it('uses its name', () => {
      const short = {it};
      assert.deepEqual(short, {func: func});
    });
    
    it('different key must be given explicitly, just like before ES6', () => {
      const short = {func};
      assert.deepEqual(short, {otherKey: func});
    });
    
    it('inline function, without `function(){}`', () => {
{'fraction_non_alphanumeric': 0.18753447324875896, 'fraction_numerical': 0.00441257584114727, 'mean_word_length': 2.501930501930502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '3214876', 'n_tokens_mistral': 593, 'n_tokens_neox': 569, 'n_words': 178}