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() {
19
19
options : {
20
20
rootPaths : [ "foo" ]
21
21
} ,
22
- fileUtils : { } ,
22
+ fileUtils : undefined // This will cause a TypeError when calling fileUtils.readFile
23
23
} ) ;
24
24
25
25
const file = "someFile" ;
26
26
const currentFileInfo = {
27
- currentDirectory : undefined // This will cause a TypeError when calling path.join
27
+ currentDirectory : "someFolder"
28
28
} ;
29
29
const handleDataAndCallCallback = sinon . stub ( ) ;
30
30
const callback = sinon . stub ( ) ;
@@ -34,8 +34,9 @@ describe("Compiler#createFileHandler", function() {
34
34
assert . equal ( handleDataAndCallCallback . callCount , 0 ) ;
35
35
assert . equal ( callback . callCount , 1 ) ;
36
36
assert . equal ( callback . getCall ( 0 ) . args . length , 1 ) ;
37
+ assert . equal ( callback . getCall ( 0 ) . args [ 0 ] . name , "TypeError" ) ;
37
38
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`
39
40
) ;
40
41
} ) ;
41
42
it ( "should propagate errors via callback function (File not found)" , async function ( ) {
You can’t perform that action at this time.
0 commit comments