You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: use more production code, fewer mocks in github tests (#1943)
* refactor: extract GIST_MAX_FILE_SIZE / GIST_MAX_FILE_COUNT constants
Hoist the gist size/count limits out of `src/main/github.ts` into `src/constants.ts` so tests can reference them by name instead of duplicating the magic numbers.
* refactor: STATIC_DIR in main/constants.ts now works in both production and tests
* test: add electron app.setPath() mock
* refactor: reduce scope of MOCK_GIST_FILES, MOCK_GIST_DATA
* refactor: remove magic string from github.spec.ts
* test: use more production code, fewer mocks in github.spec.ts
* test: stop mocking getTemplate() in github.spec.ts
* refactor: minor copyediting
* Apply suggestion from @dsanders11
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* test: safeguard tests against the credentials file location changing
* fixup! Apply suggestion from @dsanders11
* fix: unused variable warning
* fixup! test: safeguard tests against the credentials file location changing
fix: oops, removed a line accidentally
---------
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
0 commit comments