@@ -13,6 +13,7 @@ const metadata = require('../../lib/options')
13
13
const { isLocalPath, getTemplatePath } = require ( '../../lib/local-path' )
14
14
15
15
const MOCK_META_JSON_PATH = path . resolve ( './test/e2e/mock-meta-json' )
16
+ const MOCK_METALSMITH_CUSTOM = path . resolve ( './test/e2e/mock-metalsmith-custom' )
16
17
const MOCK_TEMPLATE_REPO_PATH = path . resolve ( './test/e2e/mock-template-repo' )
17
18
const MOCK_TEMPLATE_BUILD_PATH = path . resolve ( './test/e2e/mock-template-build' )
18
19
const MOCK_METADATA_REPO_JS_PATH = path . resolve ( './test/e2e/mock-metadata-repo-js' )
@@ -120,6 +121,16 @@ describe('vue-cli', () => {
120
121
} )
121
122
} )
122
123
124
+ it ( 'supports custom metalsmith plugins' , done => {
125
+ generate ( 'test' , MOCK_METALSMITH_CUSTOM , MOCK_TEMPLATE_BUILD_PATH , err => {
126
+ if ( err ) done ( err )
127
+
128
+ expect ( exists ( `${ MOCK_TEMPLATE_BUILD_PATH } /custom/readme.md` ) ) . to . equal ( true )
129
+
130
+ done ( )
131
+ } )
132
+ } )
133
+
123
134
it ( 'generate a vaild package.json with escaped author' , done => {
124
135
monkeyPatchInquirer ( escapedAnswers )
125
136
generate ( 'test' , MOCK_TEMPLATE_REPO_PATH , MOCK_TEMPLATE_BUILD_PATH , err => {
@@ -254,7 +265,7 @@ describe('vue-cli', () => {
254
265
expect ( getTemplatePath ( '../template' ) ) . to . equal ( path . join ( __dirname , '/../../../template' ) )
255
266
} )
256
267
257
- it . only ( 'points out the file in the error' , done => {
268
+ it ( 'points out the file in the error' , done => {
258
269
monkeyPatchInquirer ( answers )
259
270
generate ( 'test' , MOCK_ERROR , MOCK_TEMPLATE_BUILD_PATH , err => {
260
271
expect ( err . message ) . to . match ( / ^ \[ r e a d m e \. m d \] P a r s e e r r o r / )
0 commit comments