"use strict";

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

test('nullish operator', () => {
  const inputCode = `a ??= b;
obj.a.b ??= c;`;
  const outputCode = `a ??= b;
obj.a.b ??= c;`;
  expect(convertCode(inputCode)).toBe(outputCode);
});
test('logical operators', () => {
  const inputCode = `a ||= b;
obj.a.b ||= c;

a &&= b;
obj.a.b &&= c;`;
  const outputCode = `a ||= b;
obj.a.b ||= c;
a &&= b;
obj.a.b &&= c;`;
  expect(convertCode(inputCode)).toBe(outputCode);
});