File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 55 *
66 */
77
8+ // When using cliff with winston 0.8.x in node 14.x a warning is emitted:
9+ //
10+ // Warning: Accessing non-existent property 'padLevels' of module exports
11+ // inside circular dependency
12+ //
13+ // The warning is emitted when we require'd cliff, which happens before any
14+ // test, so in order to test that a warning is *not* emitted we have to capture
15+ // it before requiring cliff.
16+ var warnings = [ ] ;
17+ process . on ( 'warning' , function ( warning ) {
18+ warnings . push ( warning ) ;
19+ } ) ;
20+
821var assert = require ( 'assert' ) ,
922 vows = require ( 'vows' ) ,
1023 eyes = require ( 'eyes' ) ,
1124 cliff = require ( '../lib/cliff' ) ;
1225
1326vows . describe ( 'cliff' ) . addBatch ( {
27+ "When require cliff module" : {
28+ "no warning should be raised" : function ( ) {
29+ var rows = [
30+ [ "a" , "b" ] ,
31+ ] ;
32+ cliff . putRows ( 'info' , rows , [ 'red' , 'green' ] ) ;
33+ assert . isEmpty ( warnings ) ;
34+ } ,
35+ } ,
1436 "When using cliff module" : {
1537 "the columnMajor() method" : {
1638 "should respond with rows in column major form" : function ( ) {
@@ -76,4 +98,4 @@ vows.describe('cliff').addBatch({
7698 }
7799 }
78100 }
79- } ) . export ( module ) ;
101+ } ) . export ( module ) ;
You can’t perform that action at this time.
0 commit comments