@@ -4,55 +4,47 @@ const verify = require('../lib/verify');
44test ( 'Verify String "changelogFile" and "chagngelogTitle"' , t => {
55 const changelogFile = 'docs/changelog.txt' ;
66 const changelogTitle = '# My title here' ;
7- t . notThrows ( ( ) => verify ( { changelogFile, changelogTitle} ) ) ;
7+ t . notThrows ( ( ) => verify ( { changelogFile, changelogTitle} , { } ) ) ;
88} ) ;
99
1010test ( 'Verify undefined "changelogFile" and "chagngelogTitle"' , t => {
11- t . notThrows ( ( ) => verify ( { } ) ) ;
12- } ) ;
13-
14- test ( 'Throw SemanticReleaseError if "changelogFile" option is not a String' , t => {
15- const changelogFile = 42 ;
16- const [ error ] = t . throws ( ( ) => verify ( { changelogFile} ) ) ;
17-
18- t . is ( error . name , 'SemanticReleaseError' ) ;
19- t . is ( error . code , 'EINVALIDCHANGELOGFILE' ) ;
11+ t . notThrows ( ( ) => verify ( { } , { } ) ) ;
2012} ) ;
2113
2214test ( 'Throw SemanticReleaseError if "changelogFile" option is an empty String' , t => {
2315 const changelogFile = '' ;
24- const [ error ] = t . throws ( ( ) => verify ( { changelogFile} ) ) ;
16+ const [ error ] = t . throws ( ( ) => verify ( { changelogFile} , { } ) ) ;
2517
2618 t . is ( error . name , 'SemanticReleaseError' ) ;
2719 t . is ( error . code , 'EINVALIDCHANGELOGFILE' ) ;
2820} ) ;
2921
3022test ( 'Throw SemanticReleaseError if "changelogFile" option is a whitespace String' , t => {
3123 const changelogFile = ' \n \r ' ;
32- const [ error ] = t . throws ( ( ) => verify ( { changelogFile} ) ) ;
24+ const [ error ] = t . throws ( ( ) => verify ( { changelogFile} , { } ) ) ;
3325
3426 t . is ( error . name , 'SemanticReleaseError' ) ;
3527 t . is ( error . code , 'EINVALIDCHANGELOGFILE' ) ;
3628} ) ;
3729
3830test ( 'Throw SemanticReleaseError if "changelogTitle" option is not a String' , t => {
3931 const changelogTitle = 42 ;
40- const [ error ] = t . throws ( ( ) => verify ( { changelogTitle} ) ) ;
32+ const [ error ] = t . throws ( ( ) => verify ( { changelogTitle} , { } ) ) ;
4133
4234 t . is ( error . name , 'SemanticReleaseError' ) ;
4335 t . is ( error . code , 'EINVALIDCHANGELOGTITLE' ) ;
4436} ) ;
4537
4638test ( 'Throw SemanticReleaseError if "changelogTitle" option is an empty String' , t => {
47- const [ error ] = t . throws ( ( ) => verify ( { changelogTitle : '' } ) ) ;
39+ const [ error ] = t . throws ( ( ) => verify ( { changelogTitle : '' } , { } ) ) ;
4840
4941 t . is ( error . name , 'SemanticReleaseError' ) ;
5042 t . is ( error . code , 'EINVALIDCHANGELOGTITLE' ) ;
5143} ) ;
5244
5345test ( 'Throw SemanticReleaseError if "changelogTitle" option is a whitespace String' , t => {
5446 const changelogTitle = ' \n \r ' ;
55- const [ error ] = t . throws ( ( ) => verify ( { changelogTitle} ) ) ;
47+ const [ error ] = t . throws ( ( ) => verify ( { changelogTitle} , { } ) ) ;
5648
5749 t . is ( error . name , 'SemanticReleaseError' ) ;
5850 t . is ( error . code , 'EINVALIDCHANGELOGTITLE' ) ;
0 commit comments