<commit_before>// jshint esnext: true
import browsers2sauce from './index';
import { deepEqual } from 'assert';

describe('Browserslist Saucelabs', () => {
    it('parses browserslist input, outputs basic capabilities', () => {
        deepEqual(
            browsers2sauce({ browsers: ['ie 9'] }),
            [
                { browserName: 'Internet Explorer', version: '9', platform: 'Windows 7' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ios 8.3'] }),
            [
                { browserName: 'iPhone', version: '8.1', platform: 'OS X 10.10', deviceName: 'iPhone Simulator' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ie 9-11'] }),
            [
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 10' },
                { browserName: 'Internet Explorer', version: '10', platform: 'Windows 8' },
                { browserName: 'Internet Explorer', version: '9', platform: 'Windows 7' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['android 4.2'] }),
            [
                { browserName: 'Android', version: '4.2', platform: 'Linux', deviceName: 'Android Emulator' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['chrome 42'] }),
            [
                { browserName: 'Chrome', version: '42', platform: 'OS X 10.9' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ff 38'] }),
            [
                { browserName: 'Firefox', version: '38', platform: 'OS X 10.9' },
            ]
        );
    });

    it('parses browserslist input, outputs all available capabilities if allPlatforms is true', () => {
        deepEqual(
            browsers2sauce({ browsers: ['ios 8.3'], allPlatforms: true }),
            [
                { browserName: 'iPhone', version: '8.1', platform: 'OS X 10.10', deviceName: 'iPhone Simulator' },
                { browserName: 'iPad', version: '8.1', platform: 'OS X 10.10', deviceName: 'iPad Simulator' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ie 11'], allPlatforms: true }),
            [
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 10' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 8.1' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 7' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ie >= 8'], allPlatforms: true }),
            [
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 10' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 8.1' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 7' },
                { browserName: 'Internet Explorer', version: '10', platform: 'Windows 8' },
                { browserName: 'Internet Explorer', version: '10', platform: 'Windows 7' },
                { browserName: 'Internet Explorer', version: '9', platform: 'Windows 7' },
                { browserName: 'Internet Explorer', version: '8', platform: 'Windows XP' },
                { browserName: 'Internet Explorer', version: '8', platform: 'Windows 7' },<commit_msg>fix tests, fresh caniuse doesnt have ios 8.3 :/<commit_after>// jshint esnext: true
import browsers2sauce from './index';
import { deepEqual } from 'assert';

describe('Browserslist Saucelabs', () => {
    it('parses browserslist input, outputs basic capabilities', () => {
        deepEqual(
            browsers2sauce({ browsers: ['ie 9'] }),
            [
                { browserName: 'Internet Explorer', version: '9', platform: 'Windows 7' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ios 8.4'] }),
            [
                { browserName: 'iPhone', version: '8.1', platform: 'OS X 10.10', deviceName: 'iPhone Simulator' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ie 9-11'] }),
            [
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 10' },
                { browserName: 'Internet Explorer', version: '10', platform: 'Windows 8' },
                { browserName: 'Internet Explorer', version: '9', platform: 'Windows 7' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['android 4.2'] }),
            [
                { browserName: 'Android', version: '4.2', platform: 'Linux', deviceName: 'Android Emulator' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['chrome 42'] }),
            [
                { browserName: 'Chrome', version: '42', platform: 'OS X 10.9' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ff 38'] }),
            [
                { browserName: 'Firefox', version: '38', platform: 'OS X 10.9' },
            ]
        );
    });

    it('parses browserslist input, outputs all available capabilities if allPlatforms is true', () => {
        deepEqual(
            browsers2sauce({ browsers: ['ios 8.4'], allPlatforms: true }),
            [
                { browserName: 'iPhone', version: '8.1', platform: 'OS X 10.10', deviceName: 'iPhone Simulator' },
                { browserName: 'iPad', version: '8.1', platform: 'OS X 10.10', deviceName: 'iPad Simulator' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ie 11'], allPlatforms: true }),
            [
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 10' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 8.1' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 7' },
            ]
        );

        deepEqual(
            browsers2sauce({ browsers: ['ie >= 8'], allPlatforms: true }),
            [
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 10' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 8.1' },
                { browserName: 'Internet Explorer', version: '11', platform: 'Windows 7' },
                { browserName: 'Internet Explorer', version: '10', platform: 'Windows 8' },
                { browserName: 'Internet Explorer', version: '10', platform: 'Windows 7' },
                { browserName: 'Internet Explorer', version: '9', platform: 'Windows 7' },
                { browserName: 'Internet Explorer', version: '8', platform: 'Windows XP' },
                { browserName: 'Internet Explorer', version: '8', platform: 'Windows 7' },
{'fraction_non_alphanumeric': 0.15036496350364964, 'fraction_numerical': 0.02978102189781022, 'mean_word_length': 1.9091295116772824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2151978', 'n_tokens_mistral': 2088, 'n_tokens_neox': 1857, 'n_words': 528}