Skip to content

test(cli): add tests and mocks#4

Merged
gregswindle merged 29 commits intomasterfrom
feat/GH-1-cli
Mar 21, 2018
Merged

test(cli): add tests and mocks#4
gregswindle merged 29 commits intomasterfrom
feat/GH-1-cli

Conversation

@gregswindle
Copy link
Copy Markdown
Owner

@gregswindle gregswindle commented Mar 17, 2018

Description of change

  1. Mock @octokit/rest.js and dotenv.
  2. Refactor: rename github-resource-converter.js => base-resource-converter.js
  3. Reports: send code coverage to Codacy
  4. README.md: add contributing section
  5. Add tests for baseResourceConverter and fileExporter.

Associated issue(s)

Acceptance criteria/task completion

  • The acceptance criteria for all associated issues have been completed, tested, and validated.

PR check-list

✅ Please review and check the appropriate items.

1. Code standards compliance

JavaScript Style Guide

  • ESLint passes.

2. Code quality Quality Gate

  • The quality gateways pass with an "A" grade.
Measure Scores
Complexity Complexity
Cognitive complexity
Complexity per Class
Complexity per file
Complexity per Function
Duplications Duplications
Issues Issues
Maintainability Code smells
Maintainability
Technical debt
Reliability Reliability
Security Security

3. Test coverage Coverage Status

  • The source code is 100% covered with passing specs.

** These tasks are not required to open a PR, and may be addresses while the PR is open.**

greenkeeper bot and others added 3 commits March 12, 2018 07:19
1. Mock @octokit/rest.js and dotenv
2. Refactor: rename github-resource-converter.js => base-resource-converter.js
3. Reports: send code coverage to Codacy
4. README.md: add contributing section
5. Add tests for baseResourceConverter

#1
1. Add enum exportType
2. Add object fileExporter
3. Add test fixtures

#1,#3,#4
1. Appveyor didn't like the quotes for the eslintrc config path
2. Travis still cannot find the tests
1. .eslintrc: switch-case: 2 spaces
2. .travis: git.depth = 1
3. .travis: no-npm-dedupe
4. .travis: send codacy coverage with npm-script posttest:ci:coverage:codacy
5. .env.example: better explanations with new envvars
6. manifest: format and add npm-scripts
7. docs: fix markdown-magic config to modify CONTRIBUTING.md

#1,#4
Attempt to run jest tests with full directory paths.

#1,#4
Error parsing appveyor.yml:
(Line: 37, Col: 5, Idx: 864) - (Line: 37, Col: 6, Idx: 865):
While scanning for the next token, find character that cannot
start any token

#1,#4
I'm about to give up on Jest! 😠

#1,#4
Moved __(fixtures|mocks|tests)__ dirs to rootDir 🤞
Try using the 'jest-runner-eslint' test runner for Travis-CI and Appveyor.

#1,#4
There's a reason why eslintrc is normally separated from gitignore.

#1,#4
Put directories back under lib/

#1,#4
Correct typo for the coverage directory, too.

#1,#4
- Point to the correct pathname
- Send coverage via an npm-script

#1,#2,#3,#4
@gregswindle gregswindle merged commit 1841c81 into master Mar 21, 2018
@gregswindle gregswindle deleted the feat/GH-1-cli branch March 21, 2018 08:31
gregswindle added a commit that referenced this pull request Apr 3, 2018
Add exclusion patterns for tests, source, and CPD.

#1,#2,#3,#4
gregswindle added a commit that referenced this pull request Apr 3, 2018
gregswindle added a commit that referenced this pull request Apr 3, 2018
Remove trailing whitespaces at ends of lines (L48).
- Source: SonarCloud
- Ref: L48

#1,#2,#3,#4
gregswindle added a commit that referenced this pull request Apr 3, 2018
1. Update dependencies
2. Add Greenkeeper badge
3. Add tests and mocks

   1. Mock @octokit/rest.js and dotenv
   2. Refactor: rename github-resource-converter.js => base-resource-converter.js
   3. Reports: send code coverage to Codacy
   4. README.md: add contributing section
   5. Add tests for baseResourceConverter

4. Refactor: move file export features
5. Add enum exportType
6. Add object fileExporter
7. Add test fixtures
8. Test cli: complete coverage
9. Build: jest fix testMatch config

#1,#4

* ci(travis): fix 'no tests found' error

See https://travis-ci.org/gregswindle/github-resource-converter/jobs/355791728#L2892

#1,#4

* ci(test): fix test issues

1. Appveyor didn't like the quotes for the eslintrc config path
2. Travis still cannot find the tests

* ci(tests): fix build tests

#1,#4

* ci(tests): fix build tests

#1,#4

* ci(travis): try fixing jest

#1,#4

* ci(travis): jest fixes and formatting

1. .eslintrc: switch-case: 2 spaces
2. .travis: git.depth = 1
3. .travis: no-npm-dedupe
4. .travis: send codacy coverage with npm-script posttest:ci:coverage:codacy
5. .env.example: better explanations with new envvars
6. manifest: format and add npm-scripts
7. docs: fix markdown-magic config to modify CONTRIBUTING.md

#1,#4

* ci(travis): more jest test fixes

#1,#4

* ci(travis): more jest test fixes

#1,#4

* ci(services): appveyor and travis

Attempt to run jest tests with full directory paths.

#1,#4

* ci(appveyor): fix path issue

Error parsing appveyor.yml:
(Line: 37, Col: 5, Idx: 864) - (Line: 37, Col: 6, Idx: 865):
While scanning for the next token, find character that cannot
start any token

#1,#4

* ci(jest): appveyor and travis

I'm about to give up on Jest! 😠

#1,#4

* ci(jest): appveyor and travis

#1,#4

* ci(jest): move dirs

Moved __(fixtures|mocks|tests)__ dirs to rootDir 🤞

* ci(jest): add testPathPattern flag

#1,#4

* ci(jest): re-add testMatch

* ci(jest): add package

Try using the 'jest-runner-eslint' test runner for Travis-CI and Appveyor.

#1,#4

* ci(jest): add test runner

* ci(jest): more fix attempts

* fix(jest): add missing dir

There's a reason why eslintrc is normally separated from gitignore.

#1,#4

* refactor(dirs): move directories

Put directories back under lib/

#1,#4

* docs(status): finish badges

Correct typo for the coverage directory, too.

#1,#4

* ci(tests): fix codacy-coverage

- Point to the correct pathname
- Send coverage via an npm-script

* style(lint): exlcude src analysis

Add exclusion patterns for tests, source, and CPD.

#1,#2,#3,#4

* build(repo): ignore SonarCloud artifacts

#1,#2,#3,#4

* style(code-smell): trailing whitespac

Remove trailing whitespaces at ends of lines (L48).
- Source: SonarCloud
- Ref: L48

#1,#2,#3,#4

* test(coverage): add specs

* fix(cli): import fs-extra

1. Add fs-extra as a dependency.
2. Achieve passing tests with full coverage.
3. Update npm-outdated dependencies.

GH-10

* chore(labels): add labels

GH-10,GH-11
@gregswindle
Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant