@@ -73,7 +73,8 @@ vows.describe('File creation').addBatch({
7373 'should return with a name' : Test . assertName ,
7474 'should be a file' : _testFile ( 0100600 , true ) ,
7575 'should have the default prefix' : Test . testPrefix ( 'tmp-' ) ,
76- 'should have the default postfix' : Test . testPostfix ( '.tmp' )
76+ 'should have the default postfix' : Test . testPostfix ( '.tmp' ) ,
77+ 'should have been cleaned up' : Test . testCleanup
7778 } ,
7879
7980 'when using with prefix' : {
@@ -84,7 +85,8 @@ vows.describe('File creation').addBatch({
8485 'should not return with an error' : assert . isNull ,
8586 'should return with a name' : Test . assertName ,
8687 'should be a file' : _testFile ( 0100600 , true ) ,
87- 'should have the provided prefix' : Test . testPrefix ( 'something' )
88+ 'should have the provided prefix' : Test . testPrefix ( 'something' ) ,
89+ 'should have been cleaned up' : Test . testCleanup
8890 } ,
8991
9092 'when using with postfix' : {
@@ -95,7 +97,8 @@ vows.describe('File creation').addBatch({
9597 'should not return with an error' : assert . isNull ,
9698 'should return with a name' : Test . assertName ,
9799 'should be a file' : _testFile ( 0100600 , true ) ,
98- 'should have the provided postfix' : Test . testPostfix ( '.txt' )
100+ 'should have the provided postfix' : Test . testPostfix ( '.txt' ) ,
101+ 'should have been cleaned up' : Test . testCleanup
99102 } ,
100103
101104 'when using template' : {
@@ -107,7 +110,8 @@ vows.describe('File creation').addBatch({
107110 'should return with a name' : Test . assertName ,
108111 'should be a file' : _testFile ( 0100600 , true ) ,
109112 'should have the provided prefix' : Test . testPrefix ( 'clike-' ) ,
110- 'should have the provided postfix' : Test . testPostfix ( '-postfix' )
113+ 'should have the provided postfix' : Test . testPostfix ( '-postfix' ) ,
114+ 'should have been cleaned up' : Test . testCleanup
111115 } ,
112116
113117 'when using name' : {
@@ -121,7 +125,8 @@ vows.describe('File creation').addBatch({
121125 'should be a file' : function ( err , name ) {
122126 _testFile ( 0100600 , true ) ;
123127 fs . unlinkSync ( name ) ;
124- }
128+ } ,
129+ 'should have been cleaned up' : Test . testCleanup
125130 } ,
126131
127132 'when using discardDescriptor' : {
@@ -133,6 +138,7 @@ vows.describe('File creation').addBatch({
133138 'should return with a name' : Test . assertName ,
134139 'should not return with a descriptor' : Test . assertNoDescriptor ,
135140 'should be a file' : _testFileNoDescriptor ( 0100600 ) ,
141+ 'should have been cleaned up' : Test . testCleanup
136142 } ,
137143
138144 'when using detachDescriptor' : {
@@ -147,6 +153,7 @@ vows.describe('File creation').addBatch({
147153 'should not return with an error' : assert . isNull ,
148154 'should return with a name' : Test . assertName ,
149155 'should have working descriptor after removeCallback' : _testFileAfterDetachRemove ( 0100600 ) ,
156+ 'should have been cleaned up' : Test . testCleanup
150157 } ,
151158
152159 'when using multiple options' : {
@@ -158,7 +165,8 @@ vows.describe('File creation').addBatch({
158165 'should return with a name' : Test . assertName ,
159166 'should be a file' : _testFile ( 0100640 , true ) ,
160167 'should have the provided prefix' : Test . testPrefix ( 'foo' ) ,
161- 'should have the provided postfix' : Test . testPostfix ( 'bar' )
168+ 'should have the provided postfix' : Test . testPostfix ( 'bar' ) ,
169+ 'should have been cleaned up' : Test . testCleanup
162170 } ,
163171
164172 'when using multiple options and mode' : {
@@ -170,7 +178,8 @@ vows.describe('File creation').addBatch({
170178 'should return with a name' : Test . assertName ,
171179 'should be a file' : _testFile ( 0100644 , true ) ,
172180 'should have the provided prefix' : Test . testPrefix ( 'complicated' ) ,
173- 'should have the provided postfix' : Test . testPostfix ( 'options' )
181+ 'should have the provided postfix' : Test . testPostfix ( 'options' ) ,
182+ 'should have been cleaned up' : Test . testCleanup
174183 } ,
175184
176185 'no tries' : {
@@ -190,7 +199,6 @@ vows.describe('File creation').addBatch({
190199 'should return with a name' : Test . assertName ,
191200 'should be a file' : function ( err , name ) {
192201 _testFile ( 0100600 , false ) ( err , name , null ) ;
193- fs . unlinkSync ( name ) ;
194202 }
195203 } ,
196204
0 commit comments