File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' js-vtt ' : patch
3+ ---
4+
5+ Update error thrown by invalid header
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { VTT } from '../src/vtt';
33import { Cue } from '../src/segments/cue' ;
44import { Region } from '../src/segments/region' ;
55import { Comment } from '../src/segments/comment' ;
6- import InvalidHeaderError from '../src/errors/InvalidHeaderError ' ;
6+ import InvalidVttError from '../src/errors/InvalidVttError ' ;
77
88// ---------------------------------------------------------------------------
99// Real-world-ish WebVTT fixture strings
@@ -529,12 +529,12 @@ describe('VTT fromString()', () => {
529529 expect ( vtt2 . toJSON ( ) . segments . length ) . toBe ( vtt1 . toJSON ( ) . segments . length ) ;
530530 } ) ;
531531
532- it ( 'throws InvalidHeaderError for a malformed header' , ( ) => {
533- expect ( ( ) => VTT . fromString ( 'NOT A VTT FILE' ) ) . toThrow ( InvalidHeaderError ) ;
532+ it ( 'throws InvalidVttError for a malformed header' , ( ) => {
533+ expect ( ( ) => VTT . fromString ( 'NOT A VTT FILE' ) ) . toThrow ( InvalidVttError ) ;
534534 } ) ;
535535
536- it ( 'throws InvalidHeaderError for an empty string' , ( ) => {
537- expect ( ( ) => VTT . fromString ( '' ) ) . toThrow ( InvalidHeaderError ) ;
536+ it ( 'throws InvalidVttError for an empty string' , ( ) => {
537+ expect ( ( ) => VTT . fromString ( '' ) ) . toThrow ( InvalidVttError ) ;
538538 } ) ;
539539
540540 it ( 'handles a file where cues have no blank line between NOTE and first cue' , ( ) => {
You can’t perform that action at this time.
0 commit comments