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

TypeScript Unit Tests #533

Merged
merged 16 commits into from
Dec 8, 2020
Merged

TypeScript Unit Tests #533

merged 16 commits into from
Dec 8, 2020

Conversation

steveukx
Copy link
Owner

@steveukx steveukx commented Dec 1, 2020

  • Standardises use of helper methods in tests: create with newSimpleGit and close with closeWithSuccess / closeWithError
  • Converts more unit tests to TypeScript
  • Creates TypeScript task generators for diffSummary, log and stashList
  • Refactors some internal Task types to be separate from their implementations and therefore importable independently

Fix types for `stashList`, `LogResult`
Deprecate `ListLogSummary` (now an alias of `LogResult`)

- Auto-mock `@kwsites/file-exists`
- Remove `sinon` dependency
- Fix log hash test
…h no options

Auto mock `@kwsites/file-exists`, allowing optional pass through to real library
Remove instance fixtures from setup.js
Standardise use of `newSimpleGit`, `closeWithSuccess` and `closeWithError` in tests instead of `Instance`, `closeWith` and `errorWith`
Auto-reset `@kwsites/file-exists` mock after each test
…tes types for their usage

- Fix bug in parsing of `git.commit` response where committing only deletions would list the lines changed as insertions instead.
- `parseStringResponse` to accept varargs of strings to run against, to allow for more easily running the same parser against both stdOut and stdErr
- Finally removes legacy response handlers and all usages in `git` itself
Unit tests all converted to TypeScript
Update types to match functionality in `addRemote`, `getRemotes`, `raw`, `reset`, `status`
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