<commit_before>var diread = require('../index.js');
var assert = require('assert');

describe('Check reading folder files', function() {
    it('should return 2 file names', function() {
        diread({ src: 'test/folder' }).list(function(list) {
            assert.equal(2, list.length);
        });
    });

    it('should find file with name file2.js', function() {
        diread({
            src: 'test/folder',
            mask: function(file_name) {
                return file_name.indexOf('file2.js') !== -1;
            }
        }).list(function(list) {
            assert.equal(1, list.length);
        });
    });
});<commit_msg>- feature: return filename<commit_after>var diread = require('../index.js');
var assert = require('assert');

describe('Check reading folder files', function() {
    it('should return 2 file names', function() {
        diread({ src: 'test/folder' }).list(function(list) {
            assert.equal(2, list.length);
        });
    });

    it('should find file with name file2.js', function() {
        diread({
            src: 'test/folder',
            mask: function(file_name) {
                return file_name.indexOf('file2.js') !== -1;
            }
        }).list(function(list) {
            assert.equal(1, list.length);
        });
    });

    it('should return fullpath and file name', function() {
        diread({
            src: 'test/folder/folder',
            mask: function(file_name) {
                return file_name.indexOf('file2.js') !== -1;
            }
        }).each(function(full_path, file_name) {
            assert.equal(full_path, list.length);
            assert.equal('file2.js', file_name);
        });
    });
});
{'fraction_non_alphanumeric': 0.16637272192827748, 'fraction_numerical': 0.008818342151675485, 'mean_word_length': 2.0284697508896796, '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': '7005112', 'n_tokens_mistral': 495, 'n_tokens_neox': 488, 'n_words': 106}