"use strict";

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

test('The Nullish Coalescing Operator (??)', () => {
  const inputCode = `const car = {type:"Fiat", model:"500", color:"white"};
let name = car?.name;`;
  const outputCode = `const car = {
  type: "Fiat",
  model: "500",
  color: "white"
};
let name = car?.name;`;
  expect(convertCode(inputCode)).toBe(outputCode);
});