How to use the simple-node-logger.mocks function in simple-node-logger

To help you get started, we’ve selected a few simple-node-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github darrylwest / mock-browser / test / MockBrowserTests.js View on Github external
/**
 * @class MockBrowserTests
 *
 * @author: darryl.west@roundpeg.com
 * @created: 10/10/14 5:02 PM
 */
var should = require('chai').should(),
    dash = require('lodash' ),
    MockLogger = require('simple-node-logger' ).mocks.MockLogger,
    MockBrowser = require('../lib/MockBrowser');

describe('MockBrowser', function() {
    'use strict';

    describe('#instance', function() {
        var browser = new MockBrowser(),
            methods = [
                'getDocument',
                'getWindow',
                'getHistory',
                'getLocation',
                'getNavigator',
                'getLocalStorage',
                'getSessionStorage'
            ];
github darrylwest / mock-browser / test / AbstractBrowserTests.js View on Github external
/**
 * @class AbstractBrowserTests
 *
 * @author: darryl.west@roundpeg.com
 * @created: 10/10/14 9:32 AM
 */
var should = require('chai').should(),
    dash = require('lodash' ),
    jsdom = require('jsdom' ).jsdom,
    MockLogger = require('simple-node-logger' ).mocks.MockLogger,
    MockStorage = require('../lib/MockStorage' ),
    AbstractBrowser = require('../lib/AbstractBrowser');

describe('AbstractBrowser', function() {
    'use strict';

    var createOptions = function() {
        var opts = {},
            doc = jsdom('<div>' ),
            win = doc.defaultView;

        opts.window = win;
        opts.localStorage = new MockStorage();
        opts.sessionStorage = new MockStorage();

        return opts;</div>
github darrylwest / mock-browser / test / MockStorageTests.js View on Github external
/**
 * @class AbstractStorageTests
 *
 * @author: darryl.west@roundpeg.com
 * @created: 10/10/14 4:12 PM
 */
var should = require('chai').should(),
    dash = require('lodash' ),
    MockLogger = require('simple-node-logger' ).mocks.MockLogger,
    MockStorage = require('../lib/MockStorage');

describe('MockStorage', function() {
    'use strict';

    describe('#instance', function() {
        var storage = new MockStorage(),
            methods = [
                'getItem',
                'setItem',
                'clear',
                'key',
                '__protected'
            ];

        it('should create an instance of MockStorage', function() {

simple-node-logger

A node console and file logger suitable for small, medium and large production projects.

Apache-2.0
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis