We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d887a79 commit 23619b2Copy full SHA for 23619b2
test/friendly-errors/transformers/missing-loader.js
@@ -60,5 +60,18 @@ describe('transform/missing-loader', () => {
60
expect(actualError.type).to.deep.equal('loader-not-enabled');
61
expect(actualError.loaderName).to.deep.equal('sass');
62
});
63
+
64
+ it('Typescript error is properly transformed', () => {
65
+ const startError = {
66
+ name: 'ModuleParseError',
67
+ message: 'You may need an appropriate loader',
68
+ file: '/path/to/file.ts'
69
+ };
70
+ const actualError = transform(Object.assign({}, startError));
71
72
+ expect(actualError.name).to.deep.equal('Loader not enabled');
73
+ expect(actualError.type).to.deep.equal('loader-not-enabled');
74
+ expect(actualError.loaderName).to.deep.equal('typescript');
75
+ });
76
77
0 commit comments