Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Commit 529412e

Browse files
author
Giedrius Grabauskas
committed
Updated error message and fixed test.
- Fixed `reports diagnostics and throws if errors occur during transpilation` test. - Removed file path duplicate from error message.
1 parent 2cac3ae commit 529412e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export default function typescript ( options: Options ) {
212212
});
213213

214214
if ( fatalError ) {
215-
throw new Error( `There were TypeScript errors transpiling "${id}"` );
215+
throw new Error( `There were TypeScript errors.` );
216216
}
217217

218218
return {

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe( 'rollup-plugin-typescript', function () {
8282

8383
it( 'reports diagnostics and throws if errors occur during transpilation', function () {
8484
return bundle( 'sample/syntax-error/missing-type.ts' ).catch( function ( error ) {
85-
assert.ok( error.message.indexOf( 'There were TypeScript errors' ) === 0, 'Should reject erroneous code.' );
85+
assert.ok( error.message.search( 'Error transforming') === 0 && error.message.search('There were TypeScript errors.' ) > -1, 'Should reject erroneous code.' );
8686
});
8787
});
8888

0 commit comments

Comments
 (0)