@@ -16,7 +16,7 @@ describe('base API configuration', () => {
1616 } = require ( '../../src/templating/data' ) ;
1717
1818 expect ( TEMPLATES_URL ) . toBe (
19- 'https://raw.githubusercontent.com/twilio-labs/function-templates/master /templates.json'
19+ 'https://raw.githubusercontent.com/twilio-labs/function-templates/main /templates.json'
2020 ) ;
2121 expect ( CONTENT_BASE_URL ) . toBe (
2222 'https://api.github.com/repos/twilio-labs/function-templates/contents'
@@ -32,7 +32,7 @@ describe('base API configuration', () => {
3232 } = require ( '../../src/templating/data' ) ;
3333
3434 expect ( TEMPLATES_URL ) . toBe (
35- 'https://raw.githubusercontent.com/dkundel/function-templates/master /templates.json'
35+ 'https://raw.githubusercontent.com/dkundel/function-templates/main /templates.json'
3636 ) ;
3737 expect ( CONTENT_BASE_URL ) . toBe (
3838 'https://api.github.com/repos/dkundel/function-templates/contents'
@@ -86,7 +86,7 @@ describe('with a mocked GitHub API', () => {
8686
8787 const basePath = '/repos/twilio-labs/function-templates/contents/blank' ;
8888 const templateContentScope = gitHubApi
89- . get ( `${ basePath } ?ref=master ` )
89+ . get ( `${ basePath } ?ref=main ` )
9090 . reply ( 200 , [ ] ) ;
9191 const result = await getTemplateFiles ( 'blank' ) ;
9292
@@ -102,29 +102,29 @@ describe('with a mocked GitHub API', () => {
102102 const basePath =
103103 '/repos/twilio-labs/function-templates/contents/blank/functions' ;
104104 const templateContentScope = gitHubApi
105- . get ( `${ basePath } ?ref=master ` )
105+ . get ( `${ basePath } ?ref=main ` )
106106 . reply ( 200 , [
107107 {
108108 name : 'blank.js' ,
109109 path : 'blank/functions/blank.js' ,
110110 sha : '8ffaf92aea1c5cd224fafa30165462c9eb0214bd' ,
111111 size : 80 ,
112112 url :
113- 'https://api.github.com/repos/twilio-labs/function-templates/contents/blank/functions/blank.js?ref=master ' ,
113+ 'https://api.github.com/repos/twilio-labs/function-templates/contents/blank/functions/blank.js?ref=main ' ,
114114 html_url :
115- 'https://github.com/twilio-labs/function-templates/blob/master /blank/functions/blank.js' ,
115+ 'https://github.com/twilio-labs/function-templates/blob/main /blank/functions/blank.js' ,
116116 git_url :
117117 'https://api.github.com/repos/twilio-labs/function-templates/git/blobs/8ffaf92aea1c5cd224fafa30165462c9eb0214bd' ,
118118 download_url :
119- 'https://raw.githubusercontent.com/twilio-labs/function-templates/master /blank/functions/blank.js' ,
119+ 'https://raw.githubusercontent.com/twilio-labs/function-templates/main /blank/functions/blank.js' ,
120120 type : 'file' ,
121121 _links : {
122122 self :
123- 'https://api.github.com/repos/twilio-labs/function-templates/contents/blank/functions/blank.js?ref=master ' ,
123+ 'https://api.github.com/repos/twilio-labs/function-templates/contents/blank/functions/blank.js?ref=main ' ,
124124 git :
125125 'https://api.github.com/repos/twilio-labs/function-templates/git/blobs/8ffaf92aea1c5cd224fafa30165462c9eb0214bd' ,
126126 html :
127- 'https://github.com/twilio-labs/function-templates/blob/master /blank/functions/blank.js' ,
127+ 'https://github.com/twilio-labs/function-templates/blob/main /blank/functions/blank.js' ,
128128 } ,
129129 } ,
130130 ] ) ;
@@ -136,27 +136,27 @@ describe('with a mocked GitHub API', () => {
136136 expect ( file . name ) . toEqual ( 'blank.js' ) ;
137137 expect ( file . type ) . toEqual ( 'functions' ) ;
138138 expect ( file . content ) . toEqual (
139- 'https://raw.githubusercontent.com/twilio-labs/function-templates/master /blank/functions/blank.js'
139+ 'https://raw.githubusercontent.com/twilio-labs/function-templates/main /blank/functions/blank.js'
140140 ) ;
141141 } ) ;
142142
143143 test ( 'gets a template directory with nested functions from GH and translate to template file info' , async ( ) => {
144144 const basePath =
145145 '/repos/twilio-labs/function-templates/contents/nested/functions' ;
146- gitHubApi . get ( `${ basePath } ?ref=master ` ) . reply ( 200 , [
146+ gitHubApi . get ( `${ basePath } ?ref=main ` ) . reply ( 200 , [
147147 {
148148 name : 'blank.js' ,
149149 path : 'nested/functions/blank.js' ,
150150 sha : '8ffaf92aea1c5cd224fafa30165462c9eb0214bd' ,
151151 size : 80 ,
152152 url :
153- 'https://api.github.com/repos/twilio-labs/function-templates/contents/nested/functions/blank.js?ref=master ' ,
153+ 'https://api.github.com/repos/twilio-labs/function-templates/contents/nested/functions/blank.js?ref=main ' ,
154154 html_url :
155- 'https://github.com/twilio-labs/function-templates/blob/master /nested/functions/blank.js' ,
155+ 'https://github.com/twilio-labs/function-templates/blob/main /nested/functions/blank.js' ,
156156 git_url :
157157 'https://api.github.com/repos/twilio-labs/function-templates/git/blobs/8ffaf92aea1c5cd224fafa30165462c9eb0214bd' ,
158158 download_url :
159- 'https://raw.githubusercontent.com/twilio-labs/function-templates/master /nested/functions/blank.js' ,
159+ 'https://raw.githubusercontent.com/twilio-labs/function-templates/main /nested/functions/blank.js' ,
160160 type : 'file' ,
161161 } ,
162162 {
@@ -203,7 +203,7 @@ describe('with a mocked GitHub API', () => {
203203 expect ( file . name ) . toEqual ( 'blank.js' ) ;
204204 expect ( file . type ) . toEqual ( 'functions' ) ;
205205 expect ( file . content ) . toEqual (
206- 'https://raw.githubusercontent.com/twilio-labs/function-templates/master /nested/functions/blank.js'
206+ 'https://raw.githubusercontent.com/twilio-labs/function-templates/main /nested/functions/blank.js'
207207 ) ;
208208 const nestedFile = files [ 1 ] ;
209209 expect ( nestedFile . directory ) . toEqual ( 'admin' ) ;
0 commit comments