<commit_before>import groupTest from './_group-test';

groupTest([
	{
		options: {
			'declaration-empty-line-before': true
		},
		cases: [
			{
				fixture: 'a { top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
			{
				fixture: 'a {\ntop: 15px;\n}',
				expected: 'a {\n\ntop: 15px;\n}',
			},
			{
				fixture: 'a {\r\ntop: 15px;\r\n}',
				expected: 'a {\n\r\ntop: 15px;\r\n}',
			},
			{
				fixture: 'a{\n\n top: 15px;\n bottom: 5px;}',
				expected: 'a{\n\n top: 15px;\n\n bottom: 5px;}',
			},
			{
				fixture: 'a{\r\n\r\n top: 15px;\r\n bottom: 5px;}',
				expected: 'a{\r\n\r\n top: 15px;\n\r\n bottom: 5px;}',
			},
			{
				fixture: 'a{\n --custom-prop: value;\n top: 15px;}',
				expected: 'a{\n --custom-prop: value;\n\n top: 15px;}',
			},
			{
				fixture: 'a{\n @extends .class;\r\n top: 15px;}',
				expected: 'a{\n @extends .class;\n\r\n top: 15px;}',
			},
			{
				fixture: 'a{\n $var: 15px;\n top: 15px;}',
				expected: 'a{\n $var: 15px;\n\n top: 15px;}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { ignore: ['inside-single-line-block'] }]
		},
		cases: [
			{
				fixture: 'a { top: 15px; }',
				expected: 'a { top: 15px; }',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { ignore: ['after-comment'] }]
		},
		cases: [
			{
				fixture: 'a {\n/* comment */ top: 15px;\n}',
				expected: 'a {\n/* comment */ top: 15px;\n}',
			},
			{
				fixture: 'a {\n/* comment */\ntop: 15px;\n}',
				expected: 'a {\n/* comment */\ntop: 15px;\n}',
			},
			{
				fixture: 'a {\r\n/* comment */\r\ntop: 15px;\r\n}',
				expected: 'a {\r\n/* comment */\r\ntop: 15px;\r\n}',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { ignore: ['after-declaration'] }]
		},
		cases: [
			{
				fixture: 'a {\n\n top: 15px; bottom: 5px;\n}',
				expected: 'a {\n\n top: 15px; bottom: 5px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px; bottom: 5px;\r\n}',
				expected: 'a {\r\n\r\n top: 15px; bottom: 5px;\r\n}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n bottom: 5px;\n}',
				expected: 'a {\n\n top: 15px;\n bottom: 5px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px;\r\n bottom: 5px;\r\n}',
				expected: 'a {\r\n\r\n top: 15px;\r\n bottom: 5px;\r\n}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n\n bottom: 5px;\n}',
				expected: 'a {\n\n top: 15px;\n\n bottom: 5px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px;\r\n\r\n bottom: 5px;\r\n}',
				expected: 'a {\r\n\r\n top: 15px;\r\n\r\n bottom: 5px;\r\n}',
			},
			{
				fixture: 'a{\n @extends .class;\n top: 15px;\n}',
				expected: 'a{\n @extends .class;\n\n top: 15px;\n}',
			},
			{
				fixture: 'a{\r\n @extends .class;\r\n top: 15px;\r\n}',
				expected: 'a{\r\n @extends .class;\n\r\n top: 15px;\r\n}',
			},
			{
				fixture: 'a{\n @include mixin;\n top: 15px;\n}',
				expected: 'a{\n @include mixin;\n\n top: 15px;\n}',
			},
			{
				fixture: 'a{\r\n @include mixin;\r\n top: 15px;\r\n}',
				expected: 'a{\r\n @include mixin;\n\r\n top: 15px;\r\n}',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
			{
				fixture: 'a {\r\n top: 15px;\r\n}',
				expected: 'a {\n\r\n top: 15px;\r\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { except: ['first-nested'] }]
		},
		cases: [
			{
				fixture: 'a { top: 15px;\n}',
				expected: 'a { top: 15px;\n}',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n top: 15px;\n}',
			},
			{
				fixture: 'a {\r\n top: 15px;\r\n}',
				expected: 'a {\r\n top: 15px;\r\n}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n}',
				expected: 'a {\n top: 15px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px;\r\n}',
				expected: 'a {\r\n top: 15px;\r\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { except: ['after-comment'] }]
		},
		cases: [
			{
				fixture: 'a {\n\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
			{
				fixture: 'a {/* I am a comment */ \n bottom: 5px;}',
				expected: 'a {/* I am a comment */\n \n bottom: 5px;}',
			},
			{
				fixture: 'a {/* I am a comment */ \r\n bottom: 5px;}',
				expected: 'a {/* I am a comment */\n \r\n bottom: 5px;}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n /* I am a comment */ \n\n bottom: 5px;}',
				expected: 'a {\n\n top: 15px;\n /* I am a comment */ \n bottom: 5px;}',
			},
			{
				fixture: 'a {\n /* I am a comment */ \r\n\r\n bottom: 5px;}',
				expected: 'a {\n /* I am a comment */ \r\n bottom: 5px;}',
			},
		],
	},
	{<commit_msg>Add few more tests for `after-comment` `declaration-empty-line-before`<commit_after>import groupTest from './_group-test';

groupTest([
	{
		options: {
			'declaration-empty-line-before': true
		},
		cases: [
			{
				fixture: 'a { top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
			{
				fixture: 'a {\ntop: 15px;\n}',
				expected: 'a {\n\ntop: 15px;\n}',
			},
			{
				fixture: 'a {\r\ntop: 15px;\r\n}',
				expected: 'a {\n\r\ntop: 15px;\r\n}',
			},
			{
				fixture: 'a{\n\n top: 15px;\n bottom: 5px;}',
				expected: 'a{\n\n top: 15px;\n\n bottom: 5px;}',
			},
			{
				fixture: 'a{\r\n\r\n top: 15px;\r\n bottom: 5px;}',
				expected: 'a{\r\n\r\n top: 15px;\n\r\n bottom: 5px;}',
			},
			{
				fixture: 'a{\n --custom-prop: value;\n top: 15px;}',
				expected: 'a{\n --custom-prop: value;\n\n top: 15px;}',
			},
			{
				fixture: 'a{\n @extends .class;\r\n top: 15px;}',
				expected: 'a{\n @extends .class;\n\r\n top: 15px;}',
			},
			{
				fixture: 'a{\n $var: 15px;\n top: 15px;}',
				expected: 'a{\n $var: 15px;\n\n top: 15px;}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { ignore: ['inside-single-line-block'] }]
		},
		cases: [
			{
				fixture: 'a { top: 15px; }',
				expected: 'a { top: 15px; }',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { ignore: ['after-comment'] }]
		},
		cases: [
			{
				fixture: 'a {\n/* comment */ top: 15px;\n}',
				expected: 'a {\n/* comment */ top: 15px;\n}',
			},
			{
				fixture: 'a {\n/* comment */\ntop: 15px;\n}',
				expected: 'a {\n/* comment */\ntop: 15px;\n}',
			},
			{
				fixture: 'a {\nbottom: 10px; /* comment */\ntop: 15px;\n}',
				expected: 'a {\n\nbottom: 10px; /* comment */\n\ntop: 15px;\n}',
			},
			{
				fixture: 'a {\nbottom: 10px; /* comment */\n\ntop: 15px;\n}',
				expected: 'a {\n\nbottom: 10px; /* comment */\n\ntop: 15px;\n}',
			},
			{
				fixture: 'a {\r\n/* comment */\r\ntop: 15px;\r\n}',
				expected: 'a {\r\n/* comment */\r\ntop: 15px;\r\n}',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { ignore: ['after-declaration'] }]
		},
		cases: [
			{
				fixture: 'a {\n\n top: 15px; bottom: 5px;\n}',
				expected: 'a {\n\n top: 15px; bottom: 5px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px; bottom: 5px;\r\n}',
				expected: 'a {\r\n\r\n top: 15px; bottom: 5px;\r\n}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n bottom: 5px;\n}',
				expected: 'a {\n\n top: 15px;\n bottom: 5px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px;\r\n bottom: 5px;\r\n}',
				expected: 'a {\r\n\r\n top: 15px;\r\n bottom: 5px;\r\n}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n\n bottom: 5px;\n}',
				expected: 'a {\n\n top: 15px;\n\n bottom: 5px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px;\r\n\r\n bottom: 5px;\r\n}',
				expected: 'a {\r\n\r\n top: 15px;\r\n\r\n bottom: 5px;\r\n}',
			},
			{
				fixture: 'a{\n @extends .class;\n top: 15px;\n}',
				expected: 'a{\n @extends .class;\n\n top: 15px;\n}',
			},
			{
				fixture: 'a{\r\n @extends .class;\r\n top: 15px;\r\n}',
				expected: 'a{\r\n @extends .class;\n\r\n top: 15px;\r\n}',
			},
			{
				fixture: 'a{\n @include mixin;\n top: 15px;\n}',
				expected: 'a{\n @include mixin;\n\n top: 15px;\n}',
			},
			{
				fixture: 'a{\r\n @include mixin;\r\n top: 15px;\r\n}',
				expected: 'a{\r\n @include mixin;\n\r\n top: 15px;\r\n}',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
			{
				fixture: 'a {\r\n top: 15px;\r\n}',
				expected: 'a {\n\r\n top: 15px;\r\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { except: ['first-nested'] }]
		},
		cases: [
			{
				fixture: 'a { top: 15px;\n}',
				expected: 'a { top: 15px;\n}',
			},
			{
				fixture: 'a {\n top: 15px;\n}',
				expected: 'a {\n top: 15px;\n}',
			},
			{
				fixture: 'a {\r\n top: 15px;\r\n}',
				expected: 'a {\r\n top: 15px;\r\n}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n}',
				expected: 'a {\n top: 15px;\n}',
			},
			{
				fixture: 'a {\r\n\r\n top: 15px;\r\n}',
				expected: 'a {\r\n top: 15px;\r\n}',
			},
		],
	},
	{
		options: {
			'declaration-empty-line-before': [true, { except: ['after-comment'] }]
		},
		cases: [
			{
				fixture: 'a {\n\n top: 15px;\n}',
				expected: 'a {\n\n top: 15px;\n}',
			},
			{
				fixture: 'a {/* I am a comment */ \n bottom: 5px;}',
				expected: 'a {/* I am a comment */\n \n bottom: 5px;}',
			},
			{
				fixture: 'a {\n\ntop: 10px; /* I am a comment */ \n bottom: 5px;}',
				expected: 'a {\n\ntop: 10px; /* I am a comment */\n \n bottom: 5px;}',
			},
			{
				fixture: 'a {\n\ntop: 10px; /* I am a comment */\n\n bottom: 5px;}',
				expected: 'a {\n\ntop: 10px; /* I am a comment */\n\n bottom: 5px;}',
			},
			{
				fixture: 'a {/* I am a comment */ \r\n bottom: 5px;}',
				expected: 'a {/* I am a comment */\n \r\n bottom: 5px;}',
			},
			{
				fixture: 'a {\n\n top: 15px;\n /* I am a comment */ \n\n bottom: 5px;}',
				expected: 'a {\n\n top: 15px;\n /* I am a comment */ \n bottom: 5px;}',
			},
			{
				fixture: 'a {\n /* I am a comment */ \r\n\r\n bottom: 5px;}',
				expected: 'a {\n /* I am a comment */ \r\n bottom: 5px;}',
			},
		],
	},
	{
{'fraction_non_alphanumeric': 0.2650103519668737, 'fraction_numerical': 0.03430937592428276, 'mean_word_length': 2.0767364270548985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '114570', 'n_tokens_mistral': 5726, 'n_tokens_neox': 4651, 'n_words': 1039}