403Webshell
Server IP : 159.69.118.108  /  Your IP : 216.73.216.231
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ubuntu-4gb-fsn1-1 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 13:53:54 UTC 2025 aarch64
User : root ( 0)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/node_modules/npm/node_modules/node-gyp/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/node_modules/npm/node_modules/node-gyp/test/reporter.js
const Mocha = require('mocha')

class Reporter {
  constructor (runner) {
    this.failedTests = []

    runner.on(Mocha.Runner.constants.EVENT_RUN_BEGIN, () => {
      console.log('Starting tests')
    })

    runner.on(Mocha.Runner.constants.EVENT_RUN_END, () => {
      console.log('Tests finished')
      console.log()
      console.log('****************')
      console.log('* TESTS REPORT *')
      console.log('****************')
      console.log()
      console.log(`Executed ${runner.stats.suites} suites with ${runner.stats.tests} tests in ${runner.stats.duration} ms`)
      console.log(`  Passed: ${runner.stats.passes}`)
      console.log(`  Skipped: ${runner.stats.pending}`)
      console.log(`  Failed: ${runner.stats.failures}`)
      if (this.failedTests.length > 0) {
        console.log()
        console.log('  Failed test details')
        this.failedTests.forEach((failedTest, index) => {
          console.log()
          console.log(`    ${index + 1}.'${failedTest.test.fullTitle()}'`)
          console.log(`      Name: ${failedTest.error.name}`)
          console.log(`      Message: ${failedTest.error.message}`)
          console.log(`      Code: ${failedTest.error.code}`)
          console.log(`      Stack: ${failedTest.error.stack}`)
        })
      }
      console.log()
    })

    runner.on(Mocha.Runner.constants.EVENT_SUITE_BEGIN, (suite) => {
      if (suite.root) {
        return
      }
      console.log(`Starting suite '${suite.title}'`)
    })

    runner.on(Mocha.Runner.constants.EVENT_SUITE_END, (suite) => {
      if (suite.root) {
        return
      }
      console.log(`Suite '${suite.title}' finished`)
      console.log()
    })

    runner.on(Mocha.Runner.constants.EVENT_TEST_BEGIN, (test) => {
      console.log(`Starting test '${test.title}'`)
    })

    runner.on(Mocha.Runner.constants.EVENT_TEST_PASS, (test) => {
      console.log(`Test '${test.title}' passed in ${test.duration} ms`)
    })

    runner.on(Mocha.Runner.constants.EVENT_TEST_PENDING, (test) => {
      console.log(`Test '${test.title}' skipped in ${test.duration} ms`)
    })

    runner.on(Mocha.Runner.constants.EVENT_TEST_FAIL, (test, error) => {
      this.failedTests.push({ test, error })
      console.log(`Test '${test.title}' failed in ${test.duration} ms with ${error}`)
    })

    runner.on(Mocha.Runner.constants.EVENT_TEST_END, (test) => {
      console.log()
    })
  }
}

module.exports = Reporter

Youez - 2016 - github.com/yon3zu
LinuXploit