Skip to content

Commit c2af4cc

Browse files
committed
test: refactor test cases for preprocessor
1 parent 1831536 commit c2af4cc

394 files changed

Lines changed: 315 additions & 363 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/cases/js-tmpl-resolve-img-in-partial/expected/apple.02a7c382.png renamed to test/cases/_preprocessor/ejs-custom-render/expected/assets/img/apple.02a7c382.png

File renamed without changes.

test/cases/loader-option-preprocessor-ejs-async/expected/index.html renamed to test/cases/_preprocessor/ejs-custom-render/expected/index.html

File renamed without changes.

test/cases/loader-option-preprocessor-ejs-async/src/footer.html renamed to test/cases/_preprocessor/ejs-custom-render/src/footer.html

File renamed without changes.

test/cases/loader-option-preprocessor-ejs/src/home.ejs renamed to test/cases/_preprocessor/ejs-custom-render/src/home.ejs

File renamed without changes.

test/cases/loader-option-preprocessor-ejs/webpack.config.js renamed to test/cases/_preprocessor/ejs-custom-render/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111

1212
resolve: {
1313
alias: {
14-
'@images': path.join(__dirname, '../../fixtures/images'),
14+
'@images': path.join(__dirname, '../../../fixtures/images'),
1515
},
1616
},
1717

@@ -28,9 +28,7 @@ module.exports = {
2828
},
2929
},
3030
},
31-
loaderOptions: {
32-
preprocessor: (content, { rootContext: root, data }) => ejs.render(content, data, { root }),
33-
},
31+
preprocessor: (content, { rootContext: root, data }) => ejs.render(content, data, { root }),
3432
}),
3533
],
3634

test/cases/loader-option-preprocessor-ejs-async/expected/assets/img/apple.02a7c382.png renamed to test/cases/_preprocessor/ejs-default/expected/assets/img/apple.02a7c382.png

File renamed without changes.

test/cases/loader-option-preprocessor-ejs-string/expected/index.html renamed to test/cases/_preprocessor/ejs-default/expected/index.html

File renamed without changes.

test/cases/loader-option-preprocessor-ejs-string/src/home.ejs renamed to test/cases/_preprocessor/ejs-default/src/home.ejs

File renamed without changes.

test/cases/loader-option-preprocessor-ejs-string/src/partials/footer.html renamed to test/cases/_preprocessor/ejs-default/src/partials/footer.html

File renamed without changes.

test/cases/loader-option-preprocessor-ejs-string/webpack.config.js renamed to test/cases/_preprocessor/ejs-default/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010

1111
resolve: {
1212
alias: {
13-
'@images': path.join(__dirname, '../../fixtures/images'),
13+
'@images': path.join(__dirname, '../../../fixtures/images'),
1414
},
1515
},
1616

@@ -27,9 +27,7 @@ module.exports = {
2727
},
2828
},
2929
},
30-
loaderOptions: {
31-
preprocessor: 'ejs',
32-
},
30+
preprocessor: 'ejs',
3331
}),
3432
],
3533

0 commit comments

Comments
 (0)