@@ -74,6 +74,51 @@ describe('commit', function() {
74
74
75
75
} ) ;
76
76
77
+ it ( 'should commit message with quotes' , function ( done ) {
78
+
79
+ this . timeout ( config . maxTimeout ) ; // this could take a while
80
+
81
+ // SETUP
82
+
83
+ let dummyCommitMessage = `sip sip sippin' on some "sizzurp"` ;
84
+
85
+ // Describe a repo and some files to add and commit
86
+ let repoConfig = {
87
+ path : config . paths . endUserRepo ,
88
+ files : {
89
+ dummyfile : {
90
+ contents : `duck-duck-goose` ,
91
+ filename : `mydummyfile.txt` ,
92
+ } ,
93
+ gitignore : {
94
+ contents : `node_modules/` ,
95
+ filename : `.gitignore`
96
+ }
97
+ }
98
+ } ;
99
+
100
+ // Describe an adapter
101
+ let adapterConfig = {
102
+ path : path . join ( repoConfig . path , '/node_modules/cz-jira-smart-commit' ) ,
103
+ npmName : 'cz-jira-smart-commit'
104
+ } ;
105
+
106
+ // Quick setup the repos, adapter, and grab a simple prompter
107
+ let prompter = quickPrompterSetup ( sh , repoConfig , adapterConfig , dummyCommitMessage ) ;
108
+ // TEST
109
+
110
+ // Pass in inquirer but it never gets used since we've mocked out a different
111
+ // version of prompter.
112
+ commitizenCommit ( sh , inquirer , repoConfig . path , prompter , { disableAppendPaths :true , quiet :true , emitData :true } , function ( ) {
113
+ log ( repoConfig . path , function ( logOutput ) {
114
+ expect ( logOutput ) . to . have . string ( dummyCommitMessage ) ;
115
+ done ( ) ;
116
+ } ) ;
117
+ } ) ;
118
+
119
+ } ) ;
120
+
121
+
77
122
it ( 'should commit multiline messages' , function ( done ) {
78
123
79
124
this . timeout ( config . maxTimeout ) ; // this could take a while
0 commit comments