diff --git a/.gitignore b/.gitignore index c343aaa3f..0d8c84847 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ bug.html test.html coverage/ errorShots/ -/test/index-ssr.html -/test/ssr/ssr.spec.js +/test/index-reverse.html +/test/reverse/reverse.spec.js /test/pref/tti.html *.vscode diff --git a/package.json b/package.json index 6a27a03a3..9ea8a16af 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "dev": "node ./tool/dev.js", "dev:unit": "npx karma start ./test/karma.conf.js start", - "pretest": "npm run build && node ./test/ssr/build-test.js", + "pretest": "npm run build && node ./test/reverse/build-test.js", "size": "npm run build && gzip -k dist/san.spa.modern.min.js && stat dist/san.spa.modern.min.js.gz && rm -f dist/*.gz", "test": "npm run test:unit", "test:unit": "npx karma start ./test/karma.conf.js --single-run", diff --git a/src/util/camel2kebab.js b/src/util/camel2kebab.js deleted file mode 100644 index 5702c7063..000000000 --- a/src/util/camel2kebab.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Baidu Inc. All rights reserved. - * - * This source code is licensed under the MIT license. - * See LICENSE file in the project root for license information. - * - * @file 把 camel case 字符串转换成 kebab case - */ - -// #[begin] ssr -/** - * 把 camel case 字符串转换成 kebab case - * - * @param {string} source 源字符串 - * @return {string} - */ -function camel2kebab(source) { - return source.replace(/[A-Z]/g, function (match) { - return '-' + match.toLowerCase(); - }); -} -// #[end] - -exports = module.exports = camel2kebab; diff --git a/test/index-ssr.html.tpl b/test/index-reverse.html.tpl similarity index 92% rename from test/index-ssr.html.tpl rename to test/index-reverse.html.tpl index 124a2c80e..8f774552b 100755 --- a/test/index-ssr.html.tpl +++ b/test/index-reverse.html.tpl @@ -19,11 +19,11 @@ - + -##ssr-elements## +##rendered-elements## diff --git a/test/karma-context.html b/test/karma-context.html index 5db7f8fc4..25f769699 100644 --- a/test/karma-context.html +++ b/test/karma-context.html @@ -11,7 +11,7 @@ - +
diff --git a/test/karma-context.html.tpl b/test/karma-context.html.tpl index 37856c7f7..229b5a58c 100644 --- a/test/karma-context.html.tpl +++ b/test/karma-context.html.tpl @@ -11,8 +11,8 @@ Reloaded before every execution run. - - ##ssr-elements## + + ##rendered-elements##