<commit_before>/* globals define */

(function (factory) {
    if (typeof window !== 'undefined') {
        if (window.smoke) {
            // smoke defined as a global variable
            factory(window.smoke);
            return;
        }
        if (window.define) {
            // using an AMD loader; smoke must be a module in that loaders module space
            // eslint-disable-next-line no-undef
            define(['smoke'], factory);
            return;
        }
    }

    // the only alternative left is nodejs
    factory(require('../smoke-umd.js'));
}(smoke => {
    const assert = smoke.assert;
    smoke.defTest({
        id: 'minimal-example',
        tests: [
            function examplePass() {
                assert(true);
            },
            function exampleFail() {
                this.logger.logNote('example-fail: intentional fail to test fail circuitry');
                assert(false);
            },
            function exampleAsyncPass() {<commit_msg>improve AMD sniff<commit_after>/* globals define */

(function (factory) {
    if (typeof window !== 'undefined') {
        if (window.smoke) {
            // smoke defined as a global variable
            factory(window.smoke);
            return;
        }
        if (window.define && window.define.amd) {
            // using an AMD loader; smoke must be a module in that loaders module space
            // eslint-disable-next-line no-undef
            define(['smoke'], factory);
            return;
        }
    }

    // the only alternative left is nodejs
    factory(require('../smoke-umd.js'));
}(smoke => {
    const assert = smoke.assert;
    smoke.defTest({
        id: 'minimal-example',
        tests: [
            function examplePass() {
                assert(true);
            },
            function exampleFail() {
                this.logger.logNote('example-fail: intentional fail to test fail circuitry');
                assert(false);
            },
            function exampleAsyncPass() {
{'fraction_non_alphanumeric': 0.11601388200297472, 'fraction_numerical': 0.0, 'mean_word_length': 1.5971685971685972, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5251584', 'n_tokens_mistral': 523, 'n_tokens_neox': 508, 'n_words': 143}