pitestglobals

This module is defines some global properties onto an Object which are useful in debugging and testing.

PI Test Globals - index.js

This module is defines some global properties onto an Object which are useful in debugging and testing.

Install using npm install piTestGlobals

Below is an example on how to use show the line number of your file within the console.

 
 var piTestGlobals = require('piTestGlobals');
 
 console.log(__line);
 

Generates the a error stack object and is available globally

Gets the current line number from the first item in the full stack

Gets the current function name from the first item in the full stack

Gets the current file name from the first item in the full stack

Gets the current type name from the first item in the full stack

Gets the current column number from the first item in the full stack

Generates a stack from the __fullStack with the following:

  • fileName

  • typeName

  • functionName

  • line

  • column

  • message (at typeName.functionName (fileName:line:column)