<commit_before>/*
 * scriptSpec.js
 * Copyright (C) 2017 <NAME>
 *
 * Distributed under terms of the MIT license.
 */
/* global describe, it, expect */
var requirejs = require("requirejs");

requirejs.config({
    baseUrl: __dirname + "/../src/",
    nodeRequire: require
});

var parser = requirejs("css_parser");

describe("CSS parser", function() {
    "use strict";
    it("Extract simple", function() {
        var expected = "#id { display: none}";
        var template = "<style>#id { display: none}</style>";
        var result = parser.functionString(template);
        var expectedIndex = result.indexOf(expected);

        expect(expectedIndex).not.toBe(-1);
    });
});

/* vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab : */<commit_msg>:white_check_mark: include unit test for components without style tag<commit_after>/*
 * scriptSpec.js
 * Copyright (C) 2017 <NAME>
 *
 * Distributed under terms of the MIT license.
 */
/* global describe, it, expect */
var requirejs = require("requirejs");

requirejs.config({
    baseUrl: __dirname + "/../src/",
    nodeRequire: require
});

var parser = requirejs("css_parser");

describe("CSS parser", function() {
    "use strict";
    it("Extract simple", function() {
        var expected = "#id { display: none}";
        var template = "<style>#id { display: none}</style>";
        var result = parser.functionString(template);
        var expectedIndex = result.indexOf(expected);

        expect(expectedIndex).not.toBe(-1);
    });

    it("Without style tag", function() {
        var template = "<script> define(){} </script> <template> <div/> </template";
        var result = parser.functionString(template);

        expect(result).toEqual("");
    });
});

/* vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab : */
{'fraction_non_alphanumeric': 0.1618464961067853, 'fraction_numerical': 0.008898776418242492, 'mean_word_length': 3.345410628019324, 'pattern_counts': {'":': 0, '<': 14, '<?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': '4353366', 'n_tokens_mistral': 527, 'n_tokens_neox': 514, 'n_words': 144}