Skip to content
This repository
Browse code

Removed unit tests

  • Loading branch information...
commit cbcec28d2c98bc2175a91a6a81e66390369c6a07 1 parent d95beac
TJ Holowaychuk authored January 26, 2011
3  .gitmodules
... ...
@@ -1,6 +1,3 @@
1  
-[submodule "support/expresso"]
2  
-	path = support/expresso
3  
-	url = git://github.com/visionmedia/expresso.git
4 1
 [submodule "support/should"]
5 2
 	path = support/should
6 3
 	url = git://github.com/visionmedia/should.js.git
15  Makefile
... ...
@@ -1,24 +1,13 @@
1 1
 
2 2
 SRC = $(shell find lib -name "*.js")
3  
-TESTS = $(shell find test -name "*.test.js")
4 3
 TM_BUNDLE = editors/Stylus.tmbundle
5 4
 TM_BUNDLE_DEST = ~/Library/Application\ Support/TextMate/Bundles
6 5
 
7  
-test: test-unit test-integration
8  
-
9  
-test-unit:
10  
-	@./support/expresso/bin/expresso \
11  
-		-I support \
12  
-		-I lib \
13  
-		$(TEST_FLAGS) \
14  
-		$(TESTS)
  6
+test: test-integration
15 7
 
16 8
 test-integration:
17 9
 	@node test/integration/test.js
18 10
 
19  
-test-cov:
20  
-	@$(MAKE) test TEST_FLAGS=--cov
21  
-
22 11
 docs: docs/index.html
23 12
 
24 13
 docs/index.html: $(SRC)
@@ -36,4 +25,4 @@ install-bundle:
36 25
 update-bundle:
37 26
 	cp -fr $(TM_BUNDLE_DEST)/Stylus.tmbundle editors
38 27
 
39  
-.PHONY: test test-unit test-integration install-bundle test-cov docs update-bundle
  28
+.PHONY: test test-integration install-bundle docs update-bundle
1  support/expresso
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 20ca881b3c1446b325609f8680b50b9cc2630a51
107  test/unit/clone.test.js
... ...
@@ -1,107 +0,0 @@
1  
-
2  
-/**
3  
- * Module dependencies.
4  
- */
5  
-
6  
-var nodes = require('../../lib/nodes')
7  
-  , should = require('should');
8  
-
9  
-module.exports = {
10  
-  'test default': function(){
11  
-    nodes.null.clone().should.equal(nodes.null);
12  
-  },
13  
-
14  
-  'test Color': function(){
15  
-    var node = new nodes.Color(255,50,0,1)
16  
-      , clone = node.clone();
17  
-
18  
-    clone.should.not.equal(node);
19  
-    clone.r.should.equal(255);
20  
-    clone.g.should.equal(50);
21  
-    clone.b.should.equal(0);
22  
-    clone.a.should.equal(1);
23  
-  },
24  
-  
25  
-  'test HSLA': function(){
26  
-    var node = new nodes.HSLA(100, 50, 12, 1)
27  
-      , clone = node.clone();
28  
-
29  
-    clone.should.not.equal(node);
30  
-    clone.h.should.equal(100);
31  
-    clone.s.should.equal(50);
32  
-    clone.l.should.equal(12);
33  
-    clone.a.should.equal(1);
34  
-  },
35  
-  
36  
-  'test String': function(){
37  
-    var node = new nodes.String('wahoo')
38  
-      , clone = node.clone();
39  
-
40  
-    clone.should.not.equal(node);
41  
-    clone.val.should.equal('wahoo');
42  
-  },
43  
-  
44  
-  'test Expression': function(){
45  
-    var node = new nodes.Expression(true)
46  
-      , a = new nodes.Unit(15)
47  
-      , b = new nodes.Unit(20);
48  
-
49  
-    node.push(a);
50  
-    node.push(b);
51  
-
52  
-    var clone = node.clone();
53  
-    clone.should.not.equal(node);
54  
-    clone.nodes[0].should.not.equal(a);
55  
-    clone.nodes[1].should.not.equal(b);
56  
-    clone.nodes[0].val.should.equal(15);
57  
-    clone.nodes[1].val.should.equal(20);
58  
-  },
59  
-  
60  
-  'test Ident': function(){
61  
-    var n = new nodes.Unit(50)
62  
-      , node = new nodes.Ident('n', n)
63  
-      , clone = node.clone();
64  
-
65  
-    clone.should.not.equal(node);
66  
-    clone.val.should.not.equal(n);
67  
-    clone.val.val.should.equal(50);
68  
-  },
69  
-  
70  
-  'test Params': function(){
71  
-    var node = new nodes.Params
72  
-      , a = new nodes.Unit(15)
73  
-      , b = new nodes.Unit(20);
74  
-
75  
-    node.push(a);
76  
-    node.push(b);
77  
-
78  
-    var clone = node.clone();
79  
-    clone.should.not.equal(node);
80  
-    clone.nodes[0].should.not.equal(a);
81  
-    clone.nodes[1].should.not.equal(b);
82  
-    clone.nodes[0].val.should.equal(15);
83  
-    clone.nodes[1].val.should.equal(20);
84  
-  },
85  
-  
86  
-  'test Group': function(){
87  
-    var parent = new nodes.Block('root')
88  
-      , block = new nodes.Block(parent)
89  
-      , a = new nodes.Unit(5)
90  
-      , b = new nodes.Unit(10)
91  
-      , group = new nodes.Group
92  
-      , sel = new nodes.Selector('form input');
93  
-
94  
-    block.parent.should.equal(parent);
95  
-    block.push(a);
96  
-    block.push(b);
97  
-    
98  
-    sel.block = block;
99  
-    group.push(sel);
100  
-
101  
-    var clone = group.clone();
102  
-    clone.should.not.equal(group);
103  
-    clone.block.should.not.equal(block);
104  
-    clone.block.nodes[0].should.not.equal(a);
105  
-    clone.block.nodes[1].should.not.equal(b);
106  
-  }
107  
-};
57  test/unit/stylus.test.js
... ...
@@ -1,57 +0,0 @@
1  
-
2  
-/**
3  
- * Module dependencies.
4  
- */
5  
-
6  
-var stylus = require('stylus')
7  
-  , should = require('should');
8  
-
9  
-module.exports = {
10  
-  'test .version': function(){
11  
-    stylus.version.should.match(/^\d+\.\d+\.\d+$/);
12  
-  },
13  
-  
14  
-  'test .nodes': function(){
15  
-    stylus.should.have.property('nodes');
16  
-  },
17  
-  
18  
-  'test .functions': function(){
19  
-    stylus.should.have.property('functions');
20  
-  },
21  
-  
22  
-  'test .render()': function(){
23  
-    stylus.render('body\n  color red', {}, function(err, stylus){
24  
-      should.equal(null, err);
25  
-      stylus.should.include.string('body');
26  
-      stylus.should.include.string('color');
27  
-      stylus.should.include.string('#f00');
28  
-    });
29  
-  },
30  
-  
31  
-  'test .render() compress option': function(){
32  
-    stylus.render('body\n  color red', { compress: true }, function(err, stylus){
33  
-      should.equal(null, err);
34  
-      stylus.should.include.string('body');
35  
-      stylus.should.include.string('color');
36  
-      stylus.should.include.string('#f00');
37  
-    });
38  
-  },
39  
-  
40  
-  // 'test .render() exception': function(){
41  
-  //   stylus.render('body\n    color red', {}, function(err, stylus){
42  
-  //     err.message.should.equal('stylus:2\n  1: \'body\'\n  2: \'    color red\'\n\nInvalid indentation, got 4 spaces and expected two');
43  
-  //   });
44  
-  //   stylus.render('body\n color red', { filename: 'foo.stylus' }, function(err, stylus){
45  
-  //     err.message.should.equal('foo.stylus:2\n  1: \'body\'\n  2: \' color red\'\n\nInvalid indentation, got one space and expected multiple of two');
46  
-  //   });
47  
-  // },
48  
-  
49  
-  'test .render() without options': function(){
50  
-    stylus.render('body\n  color red', function(err, stylus){
51  
-      should.equal(null, err);
52  
-      stylus.should.include.string('body');
53  
-      stylus.should.include.string('color');
54  
-      stylus.should.include.string('#f00');
55  
-    });
56  
-  }
57  
-};

0 notes on commit cbcec28

Please sign in to comment.
Something went wrong with that request. Please try again.