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

var assert = require("assert");

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, no need for `function(){}`', () => {
      const short = {
        inlineFunc: 'I am inline'
      };
      assert.deepEqual(short.inlineFunc(), 'I am inline');
    });
  });

});


@@ -308,17 +308,17 @@
 hort = %7B
-x
+y
 %7D;%0A     
@@ -426,11 +426,8 @@
 x, y
-: z
 %7D;%0A 
@@ -604,18 +604,20 @@
 hort = %7B
-it
+func
 %7D;%0A     
@@ -757,32 +757,42 @@
  const short = %7B
+otherKey: 
 func%7D;%0A      ass
@@ -924,16 +924,16 @@
 ort = %7B%0A
-
         
@@ -943,16 +943,22 @@
 ineFunc:
+ () =%3E
  'I am i

fix 09-object-literals-basics.js