"use strict";

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

test('Math methods', () => {
  const inputCode = `Math.trunc(4.9);
Math.sign(4);
Math.cbrt(125);
Math.log2(2);
Math.log10(10);`;
  const outputCode = `Math.trunc(4.9);
Math.sign(4);
Math.cbrt(125);
Math.log2(2);
Math.log10(10);`;
  expect(convertCode(inputCode)).toBe(outputCode);
});
test('Number methods', () => {
  const inputCode = `Number.isInteger(10); 
Number.isSafeInteger(10);
isFinite(10/0);
isNaN("Hello");`;
  const outputCode = `Number.isInteger(10);
Number.isSafeInteger(10);
isFinite(10 / 0);
isNaN("Hello");`;
  expect(convertCode(inputCode)).toBe(outputCode);
});