<commit_before>/*
 * Copyright 2015 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

define([
    'backbone',
    'src/to-field-text-node',
    'underscore'
], function(Backbone, toFieldTextNode, _) {

    describe('toFieldTextNode', function() {
        beforeEach(function() {
            this.parametricValues = [
                {field: 'NAME', value: 'penny'},
                {field: 'NAME', value: 'bob'},
                {field: 'FRIEND', value: 'penny'},
                {field: 'AGE', value: '25'}
            ];
        });

        it('returns a field text node representing the collection', function() {
            var node = toFieldTextNode(this.parametricValues);
            var fieldText = node.toString();
            expect(fieldText).toContain('MATCH{25}:AGE');
            expect(fieldText).toContain('MATCH{penny}:FRIEND');
        });

        it('returns null for an empty collection', function() {
            expect(toFieldTextNode([])).toBeNull();
        });
    });

});<commit_msg>Unused underscore failed build by js-lint. [rev: null]<commit_after>/*
 * Copyright 2015 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

define([
    'backbone',
    'src/to-field-text-node'
], function(Backbone, toFieldTextNode) {

    describe('toFieldTextNode', function() {
        beforeEach(function() {
            this.parametricValues = [
                {field: 'NAME', value: 'penny'},
                {field: 'NAME', value: 'bob'},
                {field: 'FRIEND', value: 'penny'},
                {field: 'AGE', value: '25'}
            ];
        });

        it('returns a field text node representing the collection', function() {
            var node = toFieldTextNode(this.parametricValues);
            var fieldText = node.toString();
            expect(fieldText).toContain('MATCH{25}:AGE');
            expect(fieldText).toContain('MATCH{penny}:FRIEND');
        });

        it('returns null for an empty collection', function() {
            expect(toFieldTextNode([])).toBeNull();
        });
    });

});
{'fraction_non_alphanumeric': 0.14656690140845072, 'fraction_numerical': 0.007042253521126761, 'mean_word_length': 2.3624260355029585, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '904919', 'n_tokens_mistral': 652, 'n_tokens_neox': 614, 'n_words': 160}