@@ -29,6 +29,7 @@ import { execa } from 'execa';
2929import ghPages from 'gh-pages' ;
3030import {
3131 getGitHubPagesPublicPath ,
32+ getGitHubPagesSiteUrl ,
3233 normalizeDeployBasePath ,
3334 runDeployToGitHubPages ,
3435} from '../gh-pages.js' ;
@@ -75,6 +76,16 @@ describe('runDeployToGitHubPages', () => {
7576 expect ( getGitHubPagesPublicPath ( 'octocat' , 'Hello-World' ) ) . toBe ( '/Hello-World/' ) ;
7677 } ) ;
7778
79+ it ( 'builds HTTPS site URL for project pages' , ( ) => {
80+ expect ( getGitHubPagesSiteUrl ( 'octocat' , 'Hello-World' ) ) . toBe (
81+ 'https://octocat.github.io/Hello-World/'
82+ ) ;
83+ } ) ;
84+
85+ it ( 'builds HTTPS site URL for user/org pages repo' , ( ) => {
86+ expect ( getGitHubPagesSiteUrl ( 'octocat' , 'octocat.github.io' ) ) . toBe ( 'https://octocat.github.io/' ) ;
87+ } ) ;
88+
7889 it ( 'normalizes base path overrides' , ( ) => {
7990 expect ( normalizeDeployBasePath ( '/' ) ) . toBe ( '/' ) ;
8091 expect ( normalizeDeployBasePath ( 'my-app' ) ) . toBe ( '/my-app/' ) ;
@@ -159,6 +170,9 @@ describe('runDeployToGitHubPages', () => {
159170 expect ( consoleLogSpy ) . toHaveBeenCalledWith (
160171 expect . stringContaining ( 'Deployed to GitHub Pages' )
161172 ) ;
173+ expect ( consoleLogSpy ) . toHaveBeenCalledWith (
174+ expect . stringContaining ( 'https://user.github.io/repo/' )
175+ ) ;
162176 } ) ;
163177
164178 it ( 'uses yarn when yarn.lock exists' , async ( ) => {
0 commit comments