File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ describe("Compiler#createFileHandler", function() {
1919 options : {
2020 rootPaths : [ "foo" ]
2121 } ,
22- fileUtils : { } ,
22+ fileUtils : undefined // This will cause a TypeError when calling fileUtils.readFile
2323 } ) ;
2424
2525 const file = "someFile" ;
2626 const currentFileInfo = {
27- currentDirectory : undefined // This will cause a TypeError when calling path.join
27+ currentDirectory : "someFolder"
2828 } ;
2929 const handleDataAndCallCallback = sinon . stub ( ) ;
3030 const callback = sinon . stub ( ) ;
@@ -34,8 +34,9 @@ describe("Compiler#createFileHandler", function() {
3434 assert . equal ( handleDataAndCallCallback . callCount , 0 ) ;
3535 assert . equal ( callback . callCount , 1 ) ;
3636 assert . equal ( callback . getCall ( 0 ) . args . length , 1 ) ;
37+ assert . equal ( callback . getCall ( 0 ) . args [ 0 ] . name , "TypeError" ) ;
3738 assert . equal ( callback . getCall ( 0 ) . args [ 0 ] . message ,
38- `The "path" argument must be of type string. Received undefined`
39+ `Cannot read property 'readFile' of undefined`
3940 ) ;
4041 } ) ;
4142 it ( "should propagate errors via callback function (File not found)" , async function ( ) {
You can’t perform that action at this time.
0 commit comments