Skip to content

Commit 9fff388

Browse files
committed
test: add comprehensive gh-pages behavioral snapshot tests
Add 25 behavioral snapshot tests for gh-pages v3.2.3 to detect any behavioral changes when upgrading gh-pages versions. These tests capture EXACT internal behavior of gh-pages.publish() by mocking child_process and verifying all git commands executed. Coverage: - All 8 options we pass to gh-pages (repo, branch, message, remote, git, add, dotfiles, user) - All 7 gh-pages defaults we rely on (depth, history, tag, push, dest, src, remove, silent) - 3 error scenarios (clone failure/retry, no changes, no user) - File copy operation with exact file verification - Command execution order verification - gh-pages.clean() actual filesystem deletion Key features: - Command whitelist to fail fast on unexpected git commands - Deterministic mocking with currentTestContext - Precise assertions (exact values, exact positions) - Comprehensive documentation explaining WHY each test exists - Tests only what angular-cli-ghpages ACTUALLY uses Total tests: 340 (up from 315) Behavioral tests: 25 All tests passing: ✓
1 parent e4a6834 commit 9fff388

File tree

1 file changed

+1003
-0
lines changed

1 file changed

+1003
-0
lines changed

0 commit comments

Comments
 (0)