From 214c142d9de60a7f53d8c7ada2812ffff4837e0f Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Fri, 8 Jan 2010 16:04:35 -0800
Subject: created a way to init the code without autobootstrap
---
test/ExternalApiTest.js | 12 ++++++++++++
test/formsTest.js | 4 ----
test/testabilityPatch.js | 8 +++++++-
3 files changed, 19 insertions(+), 5 deletions(-)
create mode 100644 test/ExternalApiTest.js
(limited to 'test')
diff --git a/test/ExternalApiTest.js b/test/ExternalApiTest.js
new file mode 100644
index 00000000..08771c49
--- /dev/null
+++ b/test/ExternalApiTest.js
@@ -0,0 +1,12 @@
+ExternalApiTest = TestCase("ExternalApiTest");
+
+ExternalApiTest.prototype = {
+ testItShouldExposefactory:function(){
+ var node = $('
{{b=a+1}}
')[0];
+ var settings = {};
+ var angular = angularFactory(settings);
+ var scope = angular.compile(node);
+ assertEquals(1, scope.get('a'));
+ assertEquals(2, scope.get('b'));
+ }
+};
diff --git a/test/formsTest.js b/test/formsTest.js
index e834e938..66c4ec69 100644
--- a/test/formsTest.js
+++ b/test/formsTest.js
@@ -16,7 +16,3 @@ nglrTest.prototype.testBind = function(){
assertEquals(arg, 'arg');
}).apply('XXX', ['arg']);
};
-
-
-
-
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 5fca3524..13378d36 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -13,6 +13,12 @@ function noop(){}
jstd = jstestdriver;
+swfobject = {
+ createSwf:function(){
+ fail("must mock out swfobject.createSwf in test.");
+ }
+};
+
function html(content) {
return jQuery("").html(content);
}
@@ -126,4 +132,4 @@ function assertThrows(error, fn){
fail("Expecting exception, none thrown");
}
assertEquals(error, exception);
-}
\ No newline at end of file
+}
--
cgit v1.2.3