Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iceworks] unit tests #2560

Merged
merged 20 commits into from Sep 23, 2019
Merged

[iceworks] unit tests #2560

merged 20 commits into from Sep 23, 2019

Conversation

@chenbin92
Copy link
Collaborator

chenbin92 commented Jul 29, 2019

@chenbin92 chenbin92 changed the title Iceworks/unit test [WIP][iceworks] unit test Jul 29, 2019
@chenbin92 chenbin92 changed the title [WIP][iceworks] unit test [WIP][iceworks] unit tests Jul 29, 2019
@chenbin92 chenbin92 force-pushed the iceworks/unit-test branch from 8ca5d70 to 3932f46 Jul 29, 2019
@chenbin92 chenbin92 force-pushed the iceworks/unit-test branch from 3932f46 to 741e07c Jul 30, 2019
* fix: script typo

* add --framework-mirror

* update cov script

* update cov and test script

* add goldlog.test.ts

* test: update scripts and goldlog.test
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jul 30, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@34ea547). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2560   +/-   ##
=========================================
  Coverage          ?   66.74%           
=========================================
  Files             ?       20           
  Lines             ?      845           
  Branches          ?       48           
=========================================
  Hits              ?      564           
  Misses            ?      267           
  Partials          ?       14

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34ea547...14d080c. Read the comment docs.

luhc228 added 6 commits Aug 12, 2019
* test: add test examples

* test: add oss test

* test: add dependency test

* test: add router test

* test: add menu test

* test: change equal to strictEqual

* test: add page test

* test: update test templete

* test: add getProject function and task test

* test: update configuration and dependency test

* test: add git test

* test: add test script

* fix: fix test error

* test: remove unnecessary assert api

* test: update git test

* chore: remove unnecessary code

* fix: fix test error
@luhc228 luhc228 changed the title [WIP][iceworks] unit tests [iceworks] unit tests Aug 28, 2019
@luhc228

This comment has been minimized.

Copy link
Collaborator

luhc228 commented Aug 28, 2019

package.json中加入如下字段,可从adaptercontroller这两部分内容计算测试覆盖率。

 "nyc": {
    "include": [
      "src/lib/adapter/",
      "src/app/controller/"
    ],
    "extension": [
      ".ts"
    ]
  },

由于adapter部分中的def dependency task oss部分功能未能进行测试,现在的覆盖率为66.7%。具体如下图。
image


it('get CLI conf', async () => {
const conf: any[] = await configuration.getCLIConf(undefined, ctx);
assert(conf !== []);

This comment has been minimized.

Copy link
@alvinhui

alvinhui Sep 23, 2019

Collaborator

这里永远都为 true

@alvinhui alvinhui merged commit 93159e9 into master Sep 23, 2019
4 checks passed
4 checks passed
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@delete-merged-branch delete-merged-branch bot deleted the iceworks/unit-test branch Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.