"use strict";

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

test('check for private fields', () => {
  const inputCode = `class user{
  #id ='12567890';
  static userId(obj) {
    if(!(#id in obj)) {
      return 'Empty user';
    }
    return 'User ID: $\{ obj.#id}';
  }
}`;
  const outputCode = `class user {
  #id = '12567890';
  static userId(obj) {
    if (!(#id in obj)) {
      return 'Empty user';
    }
    return 'User ID: $\{ obj.#id}';
  }
}`;
  expect(convertCode(inputCode)).toBe(outputCode);
});