Permalink
Browse files

I stand corrected. I forgot that ddescribe and iit took presedence in…

… the tests. .conf is now split, and test.sh runs both tests when called.
  • Loading branch information...
1 parent d2e2e63 commit a21398767918a89faa37784a16747caabde98531 @ibolmo committed Apr 16, 2011
Showing with 58 additions and 50 deletions.
  1. +3 −3 jsTestDriver.conf
  2. +6 −0 jsTestDriverIit.conf
  3. +47 −0 src-test/iit_tests.js
  4. +0 −46 src-test/tests.js
  5. +2 −1 test.sh
View
6 jsTestDriver.conf
@@ -1,6 +1,6 @@
server: http://localhost:9876
load:
- - "../jasmine/lib/jasmine.js"
- - "src/JasmineAdapter.js"
- - "src-test/tests.js"
+ - ../jasmine/lib/jasmine.js
+ - src/JasmineAdapter.js
+ - src-test/tests.js
View
6 jsTestDriverIit.conf
@@ -0,0 +1,6 @@
+server: http://localhost:9876
+
+load:
+ - ../jasmine/lib/jasmine.js
+ - src/JasmineAdapter.js
+ - src-test/iit_tests.js
View
47 src-test/iit_tests.js
@@ -0,0 +1,47 @@
+(function(){
+
+var specs = [];
+
+describe('root describe', function() {
+ it('nested it', function() {
+ specs.push('nested it');
+ });
+});
+
+
+describe('root describe with iit', function() {
+ it('it as iit sibling', function() {
+ specs.push('it as iit sibling');
+ });
+
+ iit('nested iit', function() {
+ specs.push('nested iit');
+ });
+});
+
+
+describe('describe that follows iit with a nested it', function() {
+ it('nested it after iit', function() {
+ specs.push('nested it after iit');
+ });
+});
+
+
+describe('describe with iit followed by it', function() {
+ iit('iit that preceeds an it', function() {
+ specs.push('iit that preceeds an it');
+ });
+
+ it('it that follows an iit', function() {
+ specs.push('it that follows an iit');
+ });
+});
+
+
+describe('test summary', function() {
+ iit('should have executed all iit tests and nothing else', function() {
+ expect(specs).toEqual(['nested iit', 'iit that preceeds an it']);
+ });
+});
+
+})();
View
46 src-test/tests.js
@@ -87,52 +87,6 @@ describe('runs', function(){
});
});
});
-
-
-var specs = [];
-
-describe('root describe', function() {
- it('nested it', function() {
- specs.push('nested it');
- });
-});
-
-
-describe('root describe with iit', function() {
- it('it as iit sibling', function() {
- specs.push('it as iit sibling');
- });
-
- iit('nested iit', function() {
- specs.push('nested iit');
- });
-});
-
-
-describe('describe that follows iit with a nested it', function() {
- it('nested it after iit', function() {
- specs.push('nested it after iit');
- });
-});
-
-
-describe('describe with iit followed by it', function() {
- iit('iit that preceeds an it', function() {
- specs.push('iit that preceeds an it');
- });
-
- it('it that follows an iit', function() {
- specs.push('it that follows an iit');
- });
-});
-
-
-describe('test summary', function() {
- iit('should have executed all iit tests and nothing else', function() {
- expect(specs).toEqual(['nested iit', 'iit that preceeds an it']);
- });
-});
-
var ran = false;
xdescribe('should not execute', function(){
View
3 test.sh
@@ -19,4 +19,5 @@ else
echo "Running '$TESTS'"
fi
-java -jar $JSTD --reset --tests "$TESTS"
+java -jar $JSTD --reset --tests "$TESTS"
+java -jar $JSTD --reset --tests "all" --config jsTestDriverIit.conf

0 comments on commit a213987

Please sign in to comment.