"use strict";

const terser = require('terser');

describe('variable declaration', () => {
  it('check let statement', () => {
    const code = `
        let juiceCount = 5;
        let juiceName = 'apple'`;
    return terser.minify(code).then(minify => {
      expect(minify.code).toBe('let juiceCount=5,juiceName="apple";');
    });
  });
  it('check var statement', () => {
    const code = `
        var juiceCount = 5;
        var juiceName = 'apple'`;
    return terser.minify(code).then(minify => {
      expect(minify.code).toBe('var juiceCount=5,juiceName="apple";');
    });
  });
  it('check const statement', () => {
    const code = `
        const juiceCount = 5;
        const juiceName = 'apple'`;
    return terser.minify(code).then(minify => {
      expect(minify.code).toBe('const juiceCount=5,juiceName="apple";');
    });
  });
});