403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/cache-manager/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/cache-manager/test/run.js
#!/usr/bin/env node
process.env.NODE_ENV = 'test';
require('../index');

var Mocha = require('mocha');
var optimist = require('optimist');
var walkDir = require('./support').walkDir;

var argv = optimist
    .usage("Usage: $0 -t [types] --reporter [reporter] --timeout [timeout]")['default'](
        {types: 'unit,functional', reporter: 'spec', timeout: 6000})
    .describe('types', 'The types of tests to run, separated by commas. E.g., unit,functional,acceptance')
    .describe('reporter', 'The mocha test reporter to use.')
    .describe('timeout', 'The mocha timeout to use per test (ms).')
    .boolean('help')
    .alias('types', 'T')
    .alias('timeout', 't')
    .alias('reporter', 'R')
    .alias('help', 'h')
    .argv;

var mocha = new Mocha({timeout: argv.timeout, reporter: argv.reporter, ui: 'bdd'});

var validTestTypes = ['unit', 'functional', 'acceptance', 'integration'];
var requestedTypes = argv.types.split(',');
var typesToUse = [];

validTestTypes.forEach(function(validTestType) {
    if (requestedTypes.indexOf(validTestType) !== -1) {
        typesToUse.push(validTestType);
    }
});

if (argv.help || typesToUse.length === 0) {
    console.log('\n' + optimist.help());
    process.exit();
}

var isValidFile = function(file) {
    if (file.match(/buster/)) {
        return false;
    }

    for (var i = 0; i < typesToUse.length; i++) {
        var testType = typesToUse[i];
        var ext = testType + ".js";

        if (file.indexOf(ext) !== -1) {
            return true;
        }
    }

    return false;
};

function run(cb) {
    walkDir('test', isValidFile, function(err, files) {
        if (err) { return cb(err); }

        files.forEach(function(file) {
            mocha.addFile(file);
        });

        cb();
    });
}

run(function(err) {
    if (err) { throw err; }
    mocha.run(function(failures) {
        process.exit(failures);
    });
});

Youez - 2016 - github.com/yon3zu
LinuXploit