<commit_before>'use strict';
const assert = require('assert');
const mock = require('mock-fs');
const isInDocker = require('./index');
const multiline = require('multiline');

describe('test is-in-docker', function () {
    after(function () {
        mock.restore();
    });

    it('should detect the process being run inside of container', function () {
        var str = '10:hugetlb:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '9:perf_event:/\n' +
            '8:cpu,cpuacct:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '7:freezer:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '6:cpuset:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '5:memory:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '4:blkio:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '3:net_cls,net_prio:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '2:devices:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '1:name=systemd:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope'
        mock({
            '/proc/1/cgroup': str<commit_msg>test compatibility<commit_after>'use strict';
var assert = require('assert');
var mock = require('mock-fs');
var isInDocker = require('./index');
var multiline = require('multiline');

describe('test is-in-docker', function () {
    after(function () {
        mock.restore();
    });

    it('should detect the process being run inside of container', function () {
        var str = '10:hugetlb:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '9:perf_event:/\n' +
            '8:cpu,cpuacct:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '7:freezer:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '6:cpuset:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '5:memory:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '4:blkio:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '3:net_cls,net_prio:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '2:devices:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope\n' +
            '1:name=systemd:/system.slice/docker-d749f13ff4d603060452dd5d3f308eebb4de3ce84939c636822ce51e554f6904.scope'
        mock({
            '/proc/1/cgroup': str
{'fraction_non_alphanumeric': 0.11387900355871886, 'fraction_numerical': 0.2523455192494338, 'mean_word_length': 4.386759581881533, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4677016', 'n_tokens_mistral': 1724, 'n_tokens_neox': 1317, 'n_words': 88}