You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('should not print the stack trace if cannot import',(done)=>{
110
117
write('empty-deps.ts','export const A = 1;');
111
-
write('test.ts',"import {MyClass} from './empty-deps';");
118
+
write('test.ts',`import {MyClass} from './empty-deps';`);
112
119
113
120
constmockConsole={error: (s: string)=>{}};
114
121
115
122
spyOn(mockConsole,'error');
116
123
117
124
main({p: basePath},mockConsole.error)
118
125
.then((exitCode)=>{
119
-
expect(mockConsole.error).toHaveBeenCalledWith('Error at '+path.join(basePath,'test.ts')+`:1:9: Module '"`+path.join(basePath,'empty-deps')+`"' has no exported member 'MyClass'.`);
126
+
expect(mockConsole.error)
127
+
.toHaveBeenCalledWith(
128
+
'Error at '+path.join(basePath,'test.ts')+`:1:9: Module '"`+
129
+
path.join(basePath,'empty-deps')+`"' has no exported member 'MyClass'.`);
expect(mockConsole.error).toHaveBeenCalledWith('Error at '+path.join(basePath,'test.ts')+':3:7: Cannot invoke an expression whose type lacks a call signature.');
150
+
expect(mockConsole.error)
151
+
.toHaveBeenCalledWith(
152
+
'Error at '+path.join(basePath,'test.ts')+
153
+
':3:7: Cannot invoke an expression whose type lacks a call signature.');
0 commit comments