@@ -29,24 +29,50 @@ import { type Debug } from "./_namespaces/ts";
29
29
30
30
invalid : [
31
31
{
32
+ filename : "src/compiler/checker.ts" ,
32
33
code : `
33
34
import { Debug } from "./_namespaces/ts";
34
- ` ,
35
+ ` . replace ( / \r ? \n / g, "\r\n" ) ,
36
+ errors : [ { messageId : "importError" , data : { name : "Debug" , path : "compiler/debug" } } ] ,
37
+ output : `
38
+ import * as Debug from "./debug";
39
+ ` . replace ( / \r ? \n / g, "\r\n" ) ,
40
+ } ,
41
+ {
42
+ filename : "src/compiler/transformers/ts.ts" ,
43
+ code : `
44
+ import { Debug } from "../_namespaces/ts";
45
+ ` . replace ( / \r ? \n / g, "\r\n" ) ,
35
46
errors : [ { messageId : "importError" , data : { name : "Debug" , path : "compiler/debug" } } ] ,
47
+ output : `
48
+ import * as Debug from "../debug";
49
+ ` . replace ( / \r ? \n / g, "\r\n" ) ,
36
50
} ,
51
+ // TODO(jakebailey): the rule probably needs to handle .js extensions
37
52
{
53
+ filename : "src/compiler/checker.ts" ,
38
54
code : `
39
55
import { Debug } from "./_namespaces/ts.js";
40
- ` ,
56
+ ` . replace ( / \r ? \n / g , "\r\n" ) ,
41
57
errors : [ { messageId : "importError" , data : { name : "Debug" , path : "compiler/debug" } } ] ,
58
+ output : `
59
+ import * as Debug from "./debug";
60
+ ` . replace ( / \r ? \n / g, "\r\n" ) ,
42
61
} ,
43
62
{
63
+ filename : "src/compiler/checker.ts" ,
44
64
code : `
45
65
import * as ts from "./_namespaces/ts";
46
66
47
67
ts.Debug.assert(true);
48
- ` ,
68
+ ` . replace ( / \r ? \n / g , "\r\n" ) ,
49
69
errors : [ { messageId : "importError" , data : { name : "Debug" , path : "compiler/debug" } } ] ,
70
+ output : `
71
+ import * as Debug from "./debug";
72
+ import * as ts from "./_namespaces/ts";
73
+
74
+ Debug.assert(true);
75
+ ` . replace ( / \r ? \n / g, "\r\n" ) ,
50
76
} ,
51
77
] ,
52
78
} ) ;
0 commit comments