UNPKG

can-globals

Version:

This module provides a dependency injection container. Modules may define a key and specify a default value (which can be static, cached lazy, or dynamic lazy), but other code can set and reset the value as needed. There is also an event system, for alert

16 lines (11 loc) 328 B
'use strict'; var LOCATION = require('./location'); var unit = require('../../test-wrapper'); unit.module('can-globals/location/location'); unit.test('Can set a location', function (assert) { var myLoc = {}; var oldLoc = LOCATION(); LOCATION(myLoc); assert.equal(LOCATION(), myLoc, 'It was set'); LOCATION(oldLoc); });