@@ -49,88 +49,88 @@ test('Load "conventional-changelog-angular" by default', async t => {
4949} ) ;
5050
5151test ( 'Accept a "parserOpts" object as option' , async t => {
52- const customParserOpts = {
52+ const customParserOptions = {
5353 headerPattern : / ^ # # (?< tag > .* ?) # # (?< shortDesc > .* ) $ / ,
5454 headerCorrespondence : [ 'tag' , 'shortDesc' ] ,
5555 } ;
56- const changelogConfig = await loadChangelogConfig ( { parserOpts : customParserOpts } , { cwd} ) ;
56+ const changelogConfig = await loadChangelogConfig ( { parserOpts : customParserOptions } , { cwd} ) ;
5757 const angularChangelogConfig = await require ( 'conventional-changelog-angular' ) ;
5858
59- t . is ( customParserOpts . headerPattern , changelogConfig . parserOpts . headerPattern ) ;
60- t . deepEqual ( customParserOpts . headerCorrespondence , changelogConfig . parserOpts . headerCorrespondence ) ;
59+ t . is ( customParserOptions . headerPattern , changelogConfig . parserOpts . headerPattern ) ;
60+ t . deepEqual ( customParserOptions . headerCorrespondence , changelogConfig . parserOpts . headerCorrespondence ) ;
6161 t . deepEqual ( changelogConfig . parserOpts . noteKeywords , angularChangelogConfig . parserOpts . noteKeywords ) ;
6262 t . deepEqual ( changelogConfig . writerOpts , angularChangelogConfig . writerOpts ) ;
6363} ) ;
6464
6565test ( 'Accept a "writerOpts" object as option' , async t => {
66- const customWriterOpts = { commitGroupsSort : 'title' , commitsSort : [ 'scope' , 'subject' ] } ;
67- const changelogConfig = await loadChangelogConfig ( { writerOpts : customWriterOpts } , { cwd} ) ;
66+ const customWriterOptions = { commitGroupsSort : 'title' , commitsSort : [ 'scope' , 'subject' ] } ;
67+ const changelogConfig = await loadChangelogConfig ( { writerOpts : customWriterOptions } , { cwd} ) ;
6868 const angularChangelogConfig = await require ( 'conventional-changelog-angular' ) ;
6969
70- t . is ( customWriterOpts . commitGroupsSort , changelogConfig . writerOpts . commitGroupsSort ) ;
71- t . deepEqual ( customWriterOpts . commitsSort , changelogConfig . writerOpts . commitsSort ) ;
70+ t . is ( customWriterOptions . commitGroupsSort , changelogConfig . writerOpts . commitGroupsSort ) ;
71+ t . deepEqual ( customWriterOptions . commitsSort , changelogConfig . writerOpts . commitsSort ) ;
7272 t . deepEqual ( changelogConfig . writerOpts . noteGroupsSort , angularChangelogConfig . writerOpts . noteGroupsSort ) ;
7373 t . deepEqual ( changelogConfig . parserOpts , angularChangelogConfig . parserOpts ) ;
7474} ) ;
7575
7676test ( 'Accept a partial "parserOpts" object as option that overwrite a preset' , async t => {
77- const customParserOpts = {
77+ const customParserOptions = {
7878 headerPattern : / ^ # # (?< tag > .* ?) # # (?< shortDesc > .* ) $ / ,
7979 headerCorrespondence : [ 'tag' , 'shortDesc' ] ,
8080 } ;
81- const changelogConfig = await loadChangelogConfig ( { parserOpts : customParserOpts , preset : 'angular' } , { cwd} ) ;
81+ const changelogConfig = await loadChangelogConfig ( { parserOpts : customParserOptions , preset : 'angular' } , { cwd} ) ;
8282 const angularChangelogConfig = await require ( 'conventional-changelog-angular' ) ;
8383
84- t . is ( customParserOpts . headerPattern , changelogConfig . parserOpts . headerPattern ) ;
85- t . deepEqual ( customParserOpts . headerCorrespondence , changelogConfig . parserOpts . headerCorrespondence ) ;
84+ t . is ( customParserOptions . headerPattern , changelogConfig . parserOpts . headerPattern ) ;
85+ t . deepEqual ( customParserOptions . headerCorrespondence , changelogConfig . parserOpts . headerCorrespondence ) ;
8686 t . truthy ( changelogConfig . parserOpts . noteKeywords ) ;
8787 t . deepEqual ( changelogConfig . writerOpts , angularChangelogConfig . writerOpts ) ;
8888} ) ;
8989
9090test ( 'Accept a "writerOpts" object as option that overwrite a preset' , async t => {
91- const customWriterOpts = { commitGroupsSort : 'title' , commitsSort : [ 'scope' , 'subject' ] } ;
92- const changelogConfig = await loadChangelogConfig ( { writerOpts : customWriterOpts , preset : 'angular' } , { cwd} ) ;
91+ const customWriterOptions = { commitGroupsSort : 'title' , commitsSort : [ 'scope' , 'subject' ] } ;
92+ const changelogConfig = await loadChangelogConfig ( { writerOpts : customWriterOptions , preset : 'angular' } , { cwd} ) ;
9393 const angularChangelogConfig = await require ( 'conventional-changelog-angular' ) ;
9494
95- t . is ( customWriterOpts . commitGroupsSort , changelogConfig . writerOpts . commitGroupsSort ) ;
96- t . deepEqual ( customWriterOpts . commitsSort , changelogConfig . writerOpts . commitsSort ) ;
95+ t . is ( customWriterOptions . commitGroupsSort , changelogConfig . writerOpts . commitGroupsSort ) ;
96+ t . deepEqual ( customWriterOptions . commitsSort , changelogConfig . writerOpts . commitsSort ) ;
9797 t . truthy ( changelogConfig . writerOpts . noteGroupsSort ) ;
9898 t . deepEqual ( changelogConfig . parserOpts , angularChangelogConfig . parserOpts ) ;
9999} ) ;
100100
101101test ( 'Accept a partial "parserOpts" object as option that overwrite a config' , async t => {
102- const customParserOpts = {
102+ const customParserOptions = {
103103 headerPattern : / ^ # # (?< tag > .* ?) # # (?< shortDesc > .* ) $ / ,
104104 headerCorrespondence : [ 'tag' , 'shortDesc' ] ,
105105 } ;
106106 const changelogConfig = await loadChangelogConfig (
107107 {
108- parserOpts : customParserOpts ,
108+ parserOpts : customParserOptions ,
109109 config : 'conventional-changelog-angular' ,
110110 } ,
111111 { cwd}
112112 ) ;
113113 const angularChangelogConfig = await require ( 'conventional-changelog-angular' ) ;
114114
115- t . is ( customParserOpts . headerPattern , changelogConfig . parserOpts . headerPattern ) ;
116- t . deepEqual ( customParserOpts . headerCorrespondence , changelogConfig . parserOpts . headerCorrespondence ) ;
115+ t . is ( customParserOptions . headerPattern , changelogConfig . parserOpts . headerPattern ) ;
116+ t . deepEqual ( customParserOptions . headerCorrespondence , changelogConfig . parserOpts . headerCorrespondence ) ;
117117 t . truthy ( changelogConfig . parserOpts . noteKeywords ) ;
118118 t . deepEqual ( changelogConfig . writerOpts , angularChangelogConfig . writerOpts ) ;
119119} ) ;
120120
121121test ( 'Accept a "writerOpts" object as option that overwrite a config' , async t => {
122- const customWriterOpts = { commitGroupsSort : 'title' , commitsSort : [ 'scope' , 'subject' ] } ;
122+ const customWriterOptions = { commitGroupsSort : 'title' , commitsSort : [ 'scope' , 'subject' ] } ;
123123 const changelogConfig = await loadChangelogConfig (
124124 {
125- writerOpts : customWriterOpts ,
125+ writerOpts : customWriterOptions ,
126126 config : 'conventional-changelog-angular' ,
127127 } ,
128128 { cwd}
129129 ) ;
130130 const angularChangelogConfig = await require ( 'conventional-changelog-angular' ) ;
131131
132- t . is ( customWriterOpts . commitGroupsSort , changelogConfig . writerOpts . commitGroupsSort ) ;
133- t . deepEqual ( customWriterOpts . commitsSort , changelogConfig . writerOpts . commitsSort ) ;
132+ t . is ( customWriterOptions . commitGroupsSort , changelogConfig . writerOpts . commitGroupsSort ) ;
133+ t . deepEqual ( customWriterOptions . commitsSort , changelogConfig . writerOpts . commitsSort ) ;
134134 t . truthy ( changelogConfig . writerOpts . noteGroupsSort ) ;
135135 t . deepEqual ( changelogConfig . parserOpts , angularChangelogConfig . parserOpts ) ;
136136} ) ;
0 commit comments