"use strict";

var _utilities = require("./utilities");

describe('not remove default syntax space', () => {
  it('original syntax', () => {
    const inputvalues = `
        p {
            border: 1px solid green;
        }`;
    const expectedOutput = 'p{border:1px solid green}';
    (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
  });
  it('syntax with some extra spaces', () => {
    const inputvalues = `
        p {
             border:   1px      solid    green;
        }`;
    const expectedOutput = 'p{border:1px solid green}';
    (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
  });
});
test('gives margin to all sides', () => {
  const inputvalues = `
    p{
       margin-top: 1px;
       margin-left: 2px;
       margin-bottom: 2px;
       margin-right: 2px;
    }`;
  const expectedOutput = 'p{margin-top:1px;margin-left:2px;margin-bottom:2px;margin-right:2px}';
  (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
});
test('gives padding to all sides', () => {
  const inputvalues = `
    p{
       padding-top: 1px;
       padding-left: 2px;
       padding-bottom: 2px;
       padding-right: 2px;
    }`;
  const expectedOutput = 'p{padding-top:1px;padding-left:2px;padding-bottom:2px;padding-right:2px}';
  (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
});
test('removes 0 when decimal value is less than 1', () => {
  const inputvalues = `
    .foo {
       padding: 10px;
       border: 0.5px solid black;
    }`;
  const expectedOutput = '.foo{padding:10px;border:.5px solid black}';
  (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
});
test('minify the color values', () => {
  const inputvalues = `
    .foo {
       background-color: rgb(255, 0, 0);
       border: 2px solid rgb(0, 255, 0);
    }`;
  const expectedOutput = '.foo{background-color:red;border:2px solid #0f0}';
  (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
});
test('remove the comments', () => {
  const inputvalues = `
    /* to give margin */
    .foo {
        margin-top: 0px;
        margin-right: 10px;
        margin-bottom: 0px;
        margin-left: 10px;
    }`;
  const expectedOutput = '.foo{margin-top:0;margin-right:10px;margin-bottom:0;margin-left:10px}';
  (0, _utilities.checkTestCases)((0, _utilities.minifyCss)(inputvalues), expectedOutput);
});