1- var test = require ( 'tape' ) ;
2- var module = require ( '../lib/index.js' ) ;
3- var HW = new module . HelloWorld ( ) ;
1+ // var test = require('tape');
2+ // var module = require('../lib/index.js');
3+ // var HW = new module.HelloWorld();
44
5- test ( 'HellowWorld error - throw exception during construction' , function ( t ) {
6- var never = '' ;
7- try {
8- var HWuhoh = new module . HelloWorld ( 'uhoh' ) ;
9- never = 'neverland' ;
10- } catch ( err ) {
11- t . ok ( err , 'expected error' ) ;
12- }
13- t . equals ( never , '' , 'constructor definitely throws' ) ;
14- t . end ( ) ;
15- } ) ;
5+ // test('HellowWorld error - throw exception during construction', function(t) {
6+ // var never = '';
7+ // try {
8+ // var HWuhoh = new module.HelloWorld('uhoh');
9+ // never = 'neverland';
10+ // } catch (err) {
11+ // t.ok(err, 'expected error');
12+ // }
13+ // t.equals(never, '', 'constructor definitely throws');
14+ // t.end();
15+ // });
1616
17- test ( 'HellowWorld error - throw type error during construction' , function ( t ) {
18- var never = '' ;
19- try {
20- var HWuhoh = new module . HelloWorld ( 24 ) ;
21- never = 'neverland' ;
22- } catch ( err ) {
23- t . ok ( err , 'expected error' ) ;
24- t . equals ( err . message , 'arg must be a string' )
25- }
26- t . equals ( never , '' , 'constructor definitely throws' ) ;
27- t . end ( ) ;
28- } ) ;
17+ // test('HellowWorld error - throw type error during construction', function(t) {
18+ // var never = '';
19+ // try {
20+ // var HWuhoh = new module.HelloWorld(24);
21+ // never = 'neverland';
22+ // } catch (err) {
23+ // t.ok(err, 'expected error');
24+ // t.equals(err.message, 'arg must be a string')
25+ // }
26+ // t.equals(never, '', 'constructor definitely throws');
27+ // t.end();
28+ // });
2929
30- test ( 'HellowWorld error - invalid constructor' , function ( t ) {
31- var never = '' ;
32- try {
33- var HWuhoh = module . HelloWorld ( ) ;
34- never = 'neverland' ;
35- } catch ( err ) {
36- t . ok ( err , 'expected error' ) ;
37- t . equals ( err . message , "Cannot call constructor as function, you need to use 'new' keyword" ) ;
38- }
39- t . equals ( never , '' , 'constructor definitely throws' ) ;
40- t . end ( ) ;
41- } ) ;
30+ // test('HellowWorld error - invalid constructor', function(t) {
31+ // var never = '';
32+ // try {
33+ // var HWuhoh = module.HelloWorld();
34+ // never = 'neverland';
35+ // } catch (err) {
36+ // t.ok(err, 'expected error');
37+ // t.equals(err.message, "Cannot call constructor as function, you need to use 'new' keyword");
38+ // }
39+ // t.equals(never, '', 'constructor definitely throws');
40+ // t.end();
41+ // });
4242
43- test ( 'HellowWorld success - valid constructor' , function ( t ) {
44- var never = '' ;
45- try {
46- var HWyay = new module . HelloWorld ( 'hello' ) ;
47- never = 'neverland' ;
48- } catch ( err ) {
49- if ( err ) throw err ;
50- }
51- t . equals ( never , 'neverland' , 'constructor definitely succeeds' ) ;
52- t . end ( ) ;
53- } ) ;
43+ // test('HellowWorld success - valid constructor', function(t) {
44+ // var never = '';
45+ // try {
46+ // var HWyay = new module.HelloWorld('hello');
47+ // never = 'neverland';
48+ // } catch (err) {
49+ // if (err) throw err;
50+ // }
51+ // t.equals(never, 'neverland', 'constructor definitely succeeds');
52+ // t.end();
53+ // });
5454
5555
56- test ( 'wave success' , function ( t ) {
57- var hello = HW . wave ( ) ;
58- t . equal ( hello , 'howdy world' , 'output of HelloWorld.wave' ) ;
59- t . end ( ) ;
60- } ) ;
56+ // test('wave success', function(t) {
57+ // var hello = HW.wave();
58+ // t.equal(hello, 'howdy world', 'output of HelloWorld.wave');
59+ // t.end();
60+ // });
6161
62- test ( 'shout success' , function ( t ) {
63- HW . shout ( 'rawr' , { } , function ( err , shout ) {
64- if ( err ) throw err ;
65- t . equal ( shout , 'rawr!' ) ;
66- t . end ( ) ;
67- } ) ;
68- } ) ;
62+ // test('shout success', function(t) {
63+ // HW.shout('rawr', {}, function(err, shout) {
64+ // if (err) throw err;
65+ // t.equal(shout, 'rawr!');
66+ // t.end();
67+ // });
68+ // });
6969
70- test ( 'shout success - options.louder' , function ( t ) {
71- HW . shout ( 'rawr' , { louder : true } , function ( err , shout ) {
72- if ( err ) throw err ;
73- t . equal ( shout , 'rawr!!!!!' ) ;
74- t . end ( ) ;
75- } ) ;
76- } ) ;
70+ // test('shout success - options.louder', function(t) {
71+ // HW.shout('rawr', { louder: true }, function(err, shout) {
72+ // if (err) throw err;
73+ // t.equal(shout, 'rawr!!!!!');
74+ // t.end();
75+ // });
76+ // });
7777
7878
79- test ( 'shout error - not enough rawr' , function ( t ) {
80- HW . shout ( 'tiny moo' , { louder : true } , function ( err , shout ) {
81- t . ok ( err , 'expected error' ) ;
82- t . ok ( err . message . indexOf ( 'rawr all the time' ) > - 1 , 'rawrs all the time are way nicer' ) ;
83- t . end ( ) ;
84- } ) ;
85- } ) ;
79+ // test('shout error - not enough rawr', function(t) {
80+ // HW.shout('tiny moo', { louder: true }, function(err, shout) {
81+ // t.ok(err, 'expected error');
82+ // t.ok(err.message.indexOf('rawr all the time') > -1, 'rawrs all the time are way nicer');
83+ // t.end();
84+ // });
85+ // });
8686
87- test ( 'shout error - non string phrase' , function ( t ) {
88- HW . shout ( 4 , { } , function ( err , shout ) {
89- t . ok ( err , 'expected error' ) ;
90- t . ok ( err . message . indexOf ( 'phrase' ) > - 1 , 'proper error message' ) ;
91- t . end ( ) ;
92- } ) ;
93- } ) ;
87+ // test('shout error - non string phrase', function(t) {
88+ // HW.shout(4, {}, function(err, shout) {
89+ // t.ok(err, 'expected error');
90+ // t.ok(err.message.indexOf('phrase') > -1, 'proper error message');
91+ // t.end();
92+ // });
93+ // });
9494
95- test ( 'shout error - no options object' , function ( t ) {
96- HW . shout ( 'rawr' , true , function ( err , shout ) {
97- t . ok ( err , 'expected error' ) ;
98- t . ok ( err . message . indexOf ( 'options' ) > - 1 , 'proper error message' ) ;
99- t . end ( ) ;
100- } ) ;
101- } ) ;
95+ // test('shout error - no options object', function(t) {
96+ // HW.shout('rawr', true, function(err, shout) {
97+ // t.ok(err, 'expected error');
98+ // t.ok(err.message.indexOf('options') > -1, 'proper error message');
99+ // t.end();
100+ // });
101+ // });
102102
103- test ( 'shout error - options.louder non boolean' , function ( t ) {
104- HW . shout ( 'rawr' , { louder : 3 } , function ( err , shout ) {
105- t . ok ( err , 'expected error' ) ;
106- t . ok ( err . message . indexOf ( 'louder' ) > - 1 , 'proper error message' ) ;
107- t . end ( ) ;
108- } ) ;
109- } ) ;
103+ // test('shout error - options.louder non boolean', function(t) {
104+ // HW.shout('rawr', { louder: 3 }, function(err, shout) {
105+ // t.ok(err, 'expected error');
106+ // t.ok(err.message.indexOf('louder') > -1, 'proper error message');
107+ // t.end();
108+ // });
109+ // });
110110
111- // we have to try/catch since a missing callback results in a throw
112- test ( 'shout error - no callback' , function ( t ) {
113- try {
114- HW . shout ( 'rawr' , { } ) ;
115- } catch ( err ) {
116- t . ok ( err , 'expected error' ) ;
117- t . ok ( err . message . indexOf ( 'callback' ) > - 1 , 'proper error message' ) ;
118- t . end ( ) ;
119- }
120- } ) ;
111+ // // we have to try/catch since a missing callback results in a throw
112+ // test('shout error - no callback', function(t) {
113+ // try {
114+ // HW.shout('rawr', {});
115+ // } catch (err) {
116+ // t.ok(err, 'expected error');
117+ // t.ok(err.message.indexOf('callback') > -1, 'proper error message');
118+ // t.end();
119+ // }
120+ // });
0 commit comments