Sha256: f504a7f2166937211a2acd1dc2d9693d03530d99f509371d4da04e33963f8228
Contents?: true
Size: 1.23 KB
Versions: 27
Compression:
Stored size: 1.23 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // ©2008-2011 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== // ======================================================================== // SC.requiredObjectForPropertyPath Tests // ======================================================================== /*globals module test ok same equals expects */ module("SC.requiredObjectForPropertyPath") ; test("should be able to resolve an object on the window", function() { var myLocal = (window.myGlobal = { test: 'this '}) ; same(myLocal, { test: 'this '}) ; same(window.myGlobal, { test: 'this '}) ; // verify we can resolve our binding path same(SC.requiredObjectForPropertyPath('myGlobal'), { test: 'this '}) ; window.myGlobal = null; }); test("should throw error when object can't be found", function() { should_throw(function(){ SC.requiredObjectForPropertyPath('notExistingObject'); }, Error, "notExistingObject could not be found"); });
Version data entries
27 entries across 27 versions & 1 rubygems