Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @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'
];
/**
* @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>
/**
* @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() {