<commit_before>import { expect } from 'chai';
import intercept from 'intercept-stdout';
import { IO, resolveValue, triggerWarnings } from '../src/input';
import { String as Text } from '../src/types';
import { compileES6 } from '../src/compiler';

describe('input.js', () => {
    describe('Value parsing', () => {
        it('should get a simple string', () => {
            const value = resolveValue('test', Text, null, true);
            expect(value).to.equals('test');
        });

        it('should return null for a required string', () => {
            const value = resolveValue('', Text, null, true);
            expect(value).to.be.null;
        });

        it('should accept the default value of a string', () => {
            const value = resolveValue('', Text, 'alaska', false);
            expect(value).to.equals('alaska');
        });
    });

    describe('Warnings', () => {
        it('should trigger a warning when has named parameter language', () => {
            let result = '';
            const stopReading = intercept(text => result += text);
            const io = IO();
            triggerWarnings(io, { language: {} })
                .then(() => {
                    stopReading();
                    expect(result).to.match(/Warning: don't use context.params.language/);
                });
        });
    });
});<commit_msg>Remove warning section from input<commit_after>import { expect } from 'chai';
import intercept from 'intercept-stdout';
import { IO, resolveValue } from '../src/input';
import { String as Text } from '../src/types';
import { compileES6 } from '../src/compiler';

describe('input.js', () => {
    describe('Value parsing', () => {
        it('should get a simple string', () => {
            const value = resolveValue('test', Text, null, true);
            expect(value).to.equals('test');
        });

        it('should return null for a required string', () => {
            const value = resolveValue('', Text, null, true);
            expect(value).to.be.null;
        });

        it('should accept the default value of a string', () => {
            const value = resolveValue('', Text, 'alaska', false);
            expect(value).to.equals('alaska');
        });
    });
});
{'fraction_non_alphanumeric': 0.17044948820649755, 'fraction_numerical': 0.0008900756564307966, 'mean_word_length': 2.1931818181818183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '3555920', 'n_tokens_mistral': 597, 'n_tokens_neox': 576, 'n_words': 167}