{"size": 873, "ext": "js", "max_stars_repo_path": "packages/babel-plugin-emotion/test/parser.test.js", "max_stars_repo_name": "forknet/emotion", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/babel-plugin-emotion/test/parser.test.js", "max_issues_repo_name": "forknet/emotion", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/babel-plugin-emotion/test/parser.test.js", "max_forks_repo_name": "forknet/emotion", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.1875, "max_line_length": 55, "alphanum_fraction": 0.587628866}
import { parseCSS } from '../src/parser'

const basicCSS = `.thing {
  display: flex;
  justify-content: center;
  width: var(--css-hash-0);
}`

const fancyCSS = `.some-selector {
  display: flex;
  justify-content: center;
  width: var(--css-hash-0);
  &:hover {
    background-color: green;
  }
  @media (max-width: 500px) {
    height: var(--css-hash-1);
    position: fixed;
  }
  @media print {
    display: none;
  }
  &::before {
    color: blue;
    width: 20px;
    height: 20px;
    content: 'pseudo';
  }
}`

const staticCSS = `.thing {
  display: block;
  height: 50px;
  width: 30px;
}`

describe('parser', () => {
  test('basic', () => {
    expect(parseCSS(basicCSS)).toMatchSnapshot()
  })
  test('fancy', () => {
    expect(parseCSS(fancyCSS)).toMatchSnapshot()
  })
  test('static', () => {
    expect(parseCSS(staticCSS, true)).toMatchSnapshot()
  })
})
