<commit_before>/* eslint-disable prefer-arrow-callback */
import test from 'ava';
import fn from './';

test('named functions', t => {
	t.is(fn(function foo() {}), 'foo');
	t.end();
});

test('anonymous', t => {
	t.is(fn(function() {}), null); // eslint-disable-line
	t.is(fn(function () {}), null);
	t.end();
});

test('nested', t => {
	t.is(fn(function () {
		function nested() {}
		nested();
	}), null);
	t.end();
});

test('nested callback', t => {
	function call(fn) {
		fn();
	}

	t.is(fn(function () {
		call(function callback() {});
	}), null);
	t.end();
});<commit_msg>update tests for latest AVA version<commit_after>import test from 'ava';
import m from './';

test('named', t => {
	t.is(m(function foo() {}), 'foo');
});

test('anonymous', t => {
	t.is(m(function() {}), null); // eslint-disable-line
	t.is(m(function () {}), null);
});

test('arrow', t => {
	t.is(m(() => {}), null);
});

test('nested', t => {
	t.is(m(function () {
		function nested() {}
		nested();
	}), null);
});

test('nested callback', t => {
	function call(fn) {
		fn();
	}

	t.is(m(function () {
		call(function callback() {});
	}), null);
});
{'fraction_non_alphanumeric': 0.27586206896551724, 'fraction_numerical': 0.0, 'mean_word_length': 3.8793103448275863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7667608', 'n_tokens_mistral': 444, 'n_tokens_neox': 433, 'n_words': 89}