"use strict";

const {
  convertCode
} = require('../utilities');

test('Ergonomic Brand checks for Private Fields', () => {
  const inputCode = `class User {
    #id = "123";
    static userId(obj){
        if(!(#id in obj)){
            return 'Empty user';
        }
        return obj.#id;
    }
}`;
  const outputCode = `class User {
  #id = "123";
  static userId(obj) {
    if (!(#id in obj)) {
      return 'Empty user';
    }
    return obj.#id;
  }
}`;
  expect(convertCode(inputCode)).toBe(outputCode);
});