Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

chore: Enable all unit test and test coverage #1045

Merged
merged 2 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ bundle-config-loader.js

hooks
.DS_Store

.nyc_output
coverage
!projectHelpers.spec.js
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ demo
*.spec.*
.vscode/
.github/
.nyc_output
coverage/
jasmine-config/
CONTRIBUTING.md
CODE_OF_CONDUCT.md
Expand Down
5 changes: 5 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"exclude": ["/demo/**"],
"reporter": ["text", "lcov"]
}
2 changes: 1 addition & 1 deletion jasmine-config/jasmine.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"spec_files": [
"!node_modules/**/*.spec.js",
"!demo/**/*.spec.js",
"./*.spec.js"
"./**/*.spec.js"
],
"helpers": [
"jasmine-config/**/*.js"
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"prepare": "npm run tsc && npm run jasmine",
"test": "npm run prepare",
"jasmine": "jasmine --config=jasmine-config/jasmine.json",
"coverage": "nyc npm run test",
"version": "rm package-lock.json && conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
},
"bin": {
Expand Down Expand Up @@ -77,6 +78,7 @@
"devDependencies": {
"@angular/compiler": "8.2.0",
"@angular/compiler-cli": "8.2.0",
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@ngtools/webpack": "8.2.0",
"@types/jasmine": "^3.3.7",
"@types/loader-utils": "^1.1.3",
Expand All @@ -87,7 +89,9 @@
"conventional-changelog-cli": "^1.3.22",
"jasmine": "^3.2.0",
"jasmine-spec-reporter": "^4.2.1",
"nyc": "^14.1.1",
"proxyquire": "2.1.0",
"source-map-support": "^0.5.13",
"tns-core-modules": "next",
"typescript": "~3.5.3"
}
Expand Down
4 changes: 3 additions & 1 deletion templates/webpack.config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const nativeScriptDevWebpack = {
getEntryModule: () => 'EntryModule',
getResolver: () => null,
getConvertedExternals: nsWebpackIndex.getConvertedExternals,
getSourceMapFilename: nsWebpackIndex.getSourceMapFilename
getSourceMapFilename: nsWebpackIndex.getSourceMapFilename,
processAppComponents: nsWebpackIndex.processAppComponents,
getUserDefinedEntries: nsWebpackIndex.getUserDefinedEntries,
};

const emptyObject = {};
Expand Down