Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-tdd

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-tdd - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

lib/util/console-recorder.js

3

lib/index.js
module.exports.desc = require('./util/desc');
module.exports.EnvManager = require('./util/env-manager');
module.exports.timeKeeper = require('./util/time-keeper');
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiZGVzYyIsInJlcXVpcmUiLCJFbnZNYW5hZ2VyIiwidGltZUtlZXBlciJdLCJtYXBwaW5ncyI6IkFBQUFBLE1BQU0sQ0FBQ0MsT0FBUCxDQUFlQyxJQUFmLEdBQXNCQyxPQUFPLENBQUMsYUFBRCxDQUE3QjtBQUNBSCxNQUFNLENBQUNDLE9BQVAsQ0FBZUcsVUFBZixHQUE0QkQsT0FBTyxDQUFDLG9CQUFELENBQW5DO0FBQ0FILE1BQU0sQ0FBQ0MsT0FBUCxDQUFlSSxVQUFmLEdBQTRCRixPQUFPLENBQUMsb0JBQUQsQ0FBbkMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cy5kZXNjID0gcmVxdWlyZSgnLi91dGlsL2Rlc2MnKTtcbm1vZHVsZS5leHBvcnRzLkVudk1hbmFnZXIgPSByZXF1aXJlKCcuL3V0aWwvZW52LW1hbmFnZXInKTtcbm1vZHVsZS5leHBvcnRzLnRpbWVLZWVwZXIgPSByZXF1aXJlKCcuL3V0aWwvdGltZS1rZWVwZXInKTtcbiJdfQ==
module.exports.ConsoleRecorder = require('./util/console-recorder');
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiZGVzYyIsInJlcXVpcmUiLCJFbnZNYW5hZ2VyIiwidGltZUtlZXBlciIsIkNvbnNvbGVSZWNvcmRlciJdLCJtYXBwaW5ncyI6IkFBQUFBLE1BQU0sQ0FBQ0MsT0FBUCxDQUFlQyxJQUFmLEdBQXNCQyxPQUFPLENBQUMsYUFBRCxDQUE3QjtBQUNBSCxNQUFNLENBQUNDLE9BQVAsQ0FBZUcsVUFBZixHQUE0QkQsT0FBTyxDQUFDLG9CQUFELENBQW5DO0FBQ0FILE1BQU0sQ0FBQ0MsT0FBUCxDQUFlSSxVQUFmLEdBQTRCRixPQUFPLENBQUMsb0JBQUQsQ0FBbkM7QUFDQUgsTUFBTSxDQUFDQyxPQUFQLENBQWVLLGVBQWYsR0FBaUNILE9BQU8sQ0FBQyx5QkFBRCxDQUF4QyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzLmRlc2MgPSByZXF1aXJlKCcuL3V0aWwvZGVzYycpO1xubW9kdWxlLmV4cG9ydHMuRW52TWFuYWdlciA9IHJlcXVpcmUoJy4vdXRpbC9lbnYtbWFuYWdlcicpO1xubW9kdWxlLmV4cG9ydHMudGltZUtlZXBlciA9IHJlcXVpcmUoJy4vdXRpbC90aW1lLWtlZXBlcicpO1xubW9kdWxlLmV4cG9ydHMuQ29uc29sZVJlY29yZGVyID0gcmVxdWlyZSgnLi91dGlsL2NvbnNvbGUtcmVjb3JkZXInKTtcbiJdfQ==

@@ -0,1 +1,7 @@

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
const path = require('path');

@@ -19,2 +25,4 @@

const ConsoleRecorder = require('./console-recorder');
const getParents = test => {

@@ -43,3 +51,4 @@ const names = [];

envVars: Joi.object().optional().unknown(true).pattern(Joi.string(), Joi.string()),
timestamp: Joi.number().optional().min(0)
timestamp: Joi.number().optional().min(0),
recordConsole: Joi.boolean().optional()
}), 'Bad Options Provided');

@@ -50,2 +59,3 @@ const useTmpDir = get(opts, 'useTmpDir', false);

const timestamp = get(opts, 'timestamp', null);
const recordConsole = get(opts, 'recordConsole', false);
let dir = null;

@@ -55,5 +65,8 @@ let nockDone = null;

let envManagerDesc = null;
let consoleRecorder = null;
const getArgs = () => ({
const getArgs = () => _objectSpread({
dir
}, consoleRecorder === null ? {} : {
getLogs: consoleRecorder.get
});

@@ -124,2 +137,7 @@

if (recordConsole === true) {
consoleRecorder = ConsoleRecorder(true);
consoleRecorder.inject();
}
await beforeEachCb(getArgs());

@@ -129,4 +147,5 @@ })();

afterEach(async () => {
if (dir !== null) {
dir = null;
if (consoleRecorder !== null) {
consoleRecorder.release();
consoleRecorder = null;
}

@@ -139,2 +158,6 @@

if (dir !== null) {
dir = null;
}
await afterEachCb(getArgs());

@@ -159,2 +182,2 @@ });

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rlc2MuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJmcyIsImNhbGxzaXRlIiwiZ2V0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m9ja0JhY2suZml4dHVyZXMgPSBgJHt0ZXN0RmlsZX1fX2Nhc3NldHRlcy9gO1xuICAgICAgICAgIG5vY2tEb25lID0gYXdhaXQgbmV3IFByb21pc2UoKHJlc29sdmUpID0+IG5vY2tCYWNrKGdlbkNhc3NldHRlTmFtZSh0aGlzLmN1cnJlbnRUZXN0KSwge30sIHJlc29sdmUpKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBiZWZvcmVFYWNoQ2IoZ2V0QXJncygpKTtcbiAgICAgIH0pKCk7XG4gICAgfSk7XG5cbiAgICBhZnRlckVhY2goYXN5bmMgKCkgPT4ge1xuICAgICAgaWYgKGRpciAhPT0gbnVsbCkge1xuICAgICAgICBkaXIgPSBudWxsO1xuICAgICAgfVxuICAgICAgaWYgKG5vY2tEb25lICE9PSBudWxsKSB7XG4gICAgICAgIG5vY2tEb25lKCk7XG4gICAgICAgIG5vY2tEb25lID0gbnVsbDtcbiAgICAgIH1cbiAgICAgIGF3YWl0IGFmdGVyRWFjaENiKGdldEFyZ3MoKSk7XG4gICAgfSk7XG5cbiAgICB0ZXN0cyh7XG4gICAgICBiZWZvcmU6IChmbikgPT4ge1xuICAgICAgICBiZWZvcmVDYiA9IGZuO1xuICAgICAgfSxcbiAgICAgIGFmdGVyOiAoZm4pID0+IHtcbiAgICAgICAgYWZ0ZXJDYiA9IGZuO1xuICAgICAgfSxcbiAgICAgIGJlZm9yZUVhY2g6IChmbikgPT4ge1xuICAgICAgICBiZWZvcmVFYWNoQ2IgPSBmbjtcbiAgICAgIH0sXG4gICAgICBhZnRlckVhY2g6IChmbikgPT4ge1xuICAgICAgICBhZnRlckVhY2hDYiA9IGZuO1xuICAgICAgfSxcbiAgICAgIGl0OiAodGVzdE5hbWUsIGZuKSA9PiBpdCh0ZXN0TmFtZSwgKCkgPT4gZm4oZ2V0QXJncygpKSlcbiAgICB9KTtcbiAgfSk7XG59O1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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ckVhY2hDYihnZXRBcmdzKCkpO1xuICAgIH0pO1xuXG4gICAgdGVzdHMoe1xuICAgICAgYmVmb3JlOiAoZm4pID0+IHtcbiAgICAgICAgYmVmb3JlQ2IgPSBmbjtcbiAgICAgIH0sXG4gICAgICBhZnRlcjogKGZuKSA9PiB7XG4gICAgICAgIGFmdGVyQ2IgPSBmbjtcbiAgICAgIH0sXG4gICAgICBiZWZvcmVFYWNoOiAoZm4pID0+IHtcbiAgICAgICAgYmVmb3JlRWFjaENiID0gZm47XG4gICAgICB9LFxuICAgICAgYWZ0ZXJFYWNoOiAoZm4pID0+IHtcbiAgICAgICAgYWZ0ZXJFYWNoQ2IgPSBmbjtcbiAgICAgIH0sXG4gICAgICBpdDogKHRlc3ROYW1lLCBmbikgPT4gaXQodGVzdE5hbWUsICgpID0+IGZuKGdldEFyZ3MoKSkpXG4gICAgfSk7XG4gIH0pO1xufTtcbiJdfQ==
{
"name": "node-tdd",
"version": "1.3.0",
"version": "1.4.0",
"description": "Test wrapper to abstract commonly used test setups",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -56,1 +56,8 @@ # node-tdd

Set timestamp to freeze time to. Will modify the result of e.g. `new Date()`.
#### recordConsole
Type: `boolean`<br>
Default: `false`
When set to true, console logging calls are recorded and can be accessed by calling `getLogs()` from within the test.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc