mirror of
https://gitee.com/openharmony/developtools_ace_ets2bundle
synced 2024-11-23 00:19:53 +00:00
add test coverage Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: Iac976a49157954185cf59c7c352488221e961795
This commit is contained in:
parent
93b8e8c818
commit
84866eee74
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,4 +5,6 @@ compiler/declarations/
|
||||
compiler/sample/build/
|
||||
compiler/component_config.json
|
||||
compiler/form_config.json
|
||||
compiler/syntax_parser/dist/
|
||||
compiler/syntax_parser/dist/
|
||||
compiler/.nyc_output
|
||||
compiler/.test_output
|
||||
|
3
OAT.xml
3
OAT.xml
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
<!-- Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -23,6 +23,7 @@
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filepath" name="compiler/node_modules/.*" desc="dependencies of ets-loader"/>
|
||||
<filteritem type="filepath" name="compiler/.nycrc" desc="nyc config file"/>
|
||||
<filteritem type="filepath" name="compiler/lib/.*" desc="files generated by ets-loader"/>
|
||||
<filteritem type="filepath" name="compiler/syntax_parser/dist/.*" desc="files generated by ets-loader"/>
|
||||
</filefilter>
|
||||
|
23
compiler/.nycrc
Normal file
23
compiler/.nycrc
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"all": true,
|
||||
"include": [
|
||||
"lib/component_map.js",
|
||||
"lib/ets_checker.js",
|
||||
"lib/process_component_build.js",
|
||||
"lib/process_component_class.js",
|
||||
"lib/process_component_constructor.js",
|
||||
"lib/process_component_member.js",
|
||||
"lib/process_custom_component.js",
|
||||
"lib/process_import.js",
|
||||
"lib/process_system_module.js",
|
||||
"lib/process_ui_syntax.js",
|
||||
"lib/utils.js",
|
||||
"lib/validate_ui_syntax.js"
|
||||
],
|
||||
"reporter":[
|
||||
"text-summary",
|
||||
"html",
|
||||
"lcovonly"
|
||||
],
|
||||
"report-dir": ".test_output/coverage"
|
||||
}
|
@ -14,12 +14,14 @@
|
||||
"create": "node ./lib/create.js --env projectName",
|
||||
"compile": "webpack --config webpack.config.js --env buildMode=debug projectName",
|
||||
"test": "npm run build && mocha test/test.js && mocha test/test.js --partialUpdate && npm run arkTest",
|
||||
"test:coverage": "npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts && mocha test/test.js && mocha test/test.js --partialUpdate",
|
||||
"generateDeclarations": "node ./build_declarations_file.js ../../../interface/sdk-js/api/@internal/component/ets ./declarations ./lib",
|
||||
"postinstall": "node npm-install.js",
|
||||
"fastbuild": "rollup -c rollup.config.js",
|
||||
"run:arkTest": "mocha \"arkTest_build/ark_compiler_ut/**/*.test.js\"",
|
||||
"run:cleanArkTest": "rm -rf arkTest_build",
|
||||
"arkTest": "./node_modules/.bin/babel ./test/ark_compiler_ut --out-dir arkTest_build/ark_compiler_ut --extensions .ts && npm run run:arkTest && npm run run:cleanArkTest"
|
||||
"arkTest": "./node_modules/.bin/babel ./test/ark_compiler_ut --out-dir arkTest_build/ark_compiler_ut --extensions .ts && npm run run:arkTest && npm run run:cleanArkTest",
|
||||
"coverage": "node_modules/nyc/bin/nyc.js npm run test:coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.20.7",
|
||||
|
Loading…
Reference in New Issue
Block a user