const parse = require('../lib/parse');
const cases = require('postcss-parser-tests');
const expect = require('chai').expect;

describe('parse', () => {
	cases.each((name, css, json) => {
		it('should parse ' + name, () => {
			let parsed = cases.jsonify(parse(css, { from: name }));

			expect(parsed).to.equal(json);
		});
	});
});
@@ -325,8 +325,839 @@
 %09%7D);%0A%7D);
+%0A%0Adescribe('parse mixins', () =%3E %7B%0A%09it('should parse mixins', () =%3E %7B%0A%09%09let root = parse('a %7B custom(); %7D'),%0A%09%09%09node = root.first.first;%0A%0A%09%09expect(node.type).to.equal('mixin');%0A%09%09expect(node.name).to.equal('custom');%0A%09%7D);%0A%0A%09it('should parse comma separated values as arguments', () =%3E %7B%0A%09%09let root = parse(%22.block %7B mixin(1, bold, url('test.png'), #000, rgb(0, 0, 0)); %7D%22),%0A%09%09%09node = root.first.first;%0A%0A%09%09expect(JSON.stringify(node.arguments)).to.equal('%5B%221%22,%22bold%22,%22url(%5C'test.png%5C')%22,%22#000%22,%22rgb(0, 0, 0)%22%5D');%0A%09%7D);%0A%0A%09it('should parse key: value pairs as arguments', () =%3E %7B%0A%09%09let root = parse(%22.block %7B mixin(padding: 1, weight: bold, background: url('test.png')); %7D%22),%0A%09%09%09node = root.first.first;%0A%0A%09%09expect(JSON.stringify(node.arguments%5B0%5D)).to.equal('%7B%22padding%22:%221%22,%22weight%22:%22bold%22,%22background%22:%22url(%5C'test.png%5C')%22%7D');%0A%09%7D);%0A%7D);

Add tests for basic mixin syntax