@@ -22,7 +22,7 @@ describe('Generated Config (QuickType)', () => {
2222 describe ( 'Convert class' , ( ) => {
2323 it ( 'should parse valid configuration JSON' , ( ) => {
2424 const validConfig = {
25- contactEmail : 'admin@ example.com' ,
25+ proxyUrl : 'https://proxy. example.com' ,
2626 cookieSecret : 'test-secret' ,
2727 authorisedList : [
2828 {
@@ -48,7 +48,7 @@ describe('Generated Config (QuickType)', () => {
4848 const result = Convert . toGitProxyConfig ( JSON . stringify ( validConfig ) ) ;
4949
5050 assert . isObject ( result ) ;
51- expect ( result . contactEmail ) . toBe ( 'admin@ example.com' ) ;
51+ expect ( result . proxyUrl ) . toBe ( 'https://proxy. example.com' ) ;
5252 expect ( result . cookieSecret ) . toBe ( 'test-secret' ) ;
5353 assert . isArray ( result . authorisedList ) ;
5454 assert . isArray ( result . authentication ) ;
@@ -57,7 +57,7 @@ describe('Generated Config (QuickType)', () => {
5757
5858 it ( 'should convert config object back to JSON' , ( ) => {
5959 const configObject = {
60- contactEmail : 'admin@ example.com' ,
60+ proxyUrl : 'https://proxy. example.com' ,
6161 cookieSecret : 'test-secret' ,
6262 authorisedList : [ ] ,
6363 authentication : [
@@ -72,7 +72,7 @@ describe('Generated Config (QuickType)', () => {
7272 const parsed = JSON . parse ( jsonString ) ;
7373
7474 assert . isObject ( parsed ) ;
75- expect ( parsed . contactEmail ) . toBe ( 'admin@ example.com' ) ;
75+ expect ( parsed . proxyUrl ) . toBe ( 'https://proxy. example.com' ) ;
7676 expect ( parsed . cookieSecret ) . toBe ( 'test-secret' ) ;
7777 } ) ;
7878
@@ -91,7 +91,7 @@ describe('Generated Config (QuickType)', () => {
9191
9292 it ( 'should handle configuration with valid rate limit structure' , ( ) => {
9393 const validConfig = {
94- contactEmail : 'admin@ example.com' ,
94+ proxyUrl : 'https://proxy. example.com' ,
9595 cookieSecret : 'secret' ,
9696 sessionMaxAgeHours : 24 ,
9797 rateLimit : {
@@ -121,6 +121,7 @@ describe('Generated Config (QuickType)', () => {
121121 enabled : true ,
122122 } ,
123123 ] ,
124+ contactEmail : 'admin@example.com' ,
124125 csrfProtection : true ,
125126 plugins : [ ] ,
126127 privateOrganizations : [ 'private-org' ] ,
@@ -137,15 +138,15 @@ describe('Generated Config (QuickType)', () => {
137138 assert . isBoolean ( result . csrfProtection ) ;
138139 assert . isArray ( result . plugins ) ;
139140 assert . isArray ( result . privateOrganizations ) ;
140- assert . isString ( result . contactEmail ) ;
141+ assert . isString ( result . proxyUrl ) ;
141142 assert . isObject ( result . rateLimit ) ;
142143 assert . isNumber ( result . sessionMaxAgeHours ) ;
143144 assert . isArray ( result . sink ) ;
144145 } ) ;
145146
146147 it ( 'should handle malformed configuration gracefully' , ( ) => {
147148 const malformedConfig = {
148- contactEmail : 123 , // Wrong type
149+ proxyUrl : 123 , // Wrong type
149150 authentication : 'not-an-array' , // Wrong type
150151 } ;
151152
@@ -154,7 +155,7 @@ describe('Generated Config (QuickType)', () => {
154155
155156 it ( 'should preserve array structures' , ( ) => {
156157 const configWithArrays = {
157- contactEmail : 'admin@ example.com' ,
158+ proxyUrl : 'https://proxy. example.com' ,
158159 cookieSecret : 'secret' ,
159160 authorisedList : [
160161 { project : 'proj1' , name : 'repo1' , url : 'https://github.com/proj1/repo1.git' } ,
@@ -176,7 +177,7 @@ describe('Generated Config (QuickType)', () => {
176177
177178 it ( 'should handle nested object structures' , ( ) => {
178179 const configWithNesting = {
179- contactEmail : 'admin@ example.com' ,
180+ proxyUrl : 'https://proxy. example.com' ,
180181 cookieSecret : 'secret' ,
181182 authentication : [ { type : 'local' , enabled : true } ] ,
182183 sink : [ { type : 'fs' , enabled : true } ] ,
@@ -206,7 +207,7 @@ describe('Generated Config (QuickType)', () => {
206207 it ( 'should handle complex validation scenarios' , ( ) => {
207208 // Test configuration that will trigger more validation paths
208209 const complexConfig = {
209- contactEmail : 'admin@ example.com' ,
210+ proxyUrl : 'https://proxy. example.com' ,
210211 cookieSecret : 'secret' ,
211212 authentication : [ { type : 'local' , enabled : true } ] ,
212213 sink : [ { type : 'fs' , enabled : true } ] ,
@@ -245,7 +246,7 @@ describe('Generated Config (QuickType)', () => {
245246
246247 it ( 'should handle array validation edge cases' , ( ) => {
247248 const configWithArrays = {
248- contactEmail : 'admin@ example.com' ,
249+ proxyUrl : 'https://proxy. example.com' ,
249250 cookieSecret : 'secret' ,
250251 authentication : [ { type : 'local' , enabled : true } ] ,
251252 sink : [ { type : 'fs' , enabled : true } ] ,
@@ -276,7 +277,7 @@ describe('Generated Config (QuickType)', () => {
276277
277278 it ( 'should exercise transformation functions with edge cases' , ( ) => {
278279 const edgeCaseConfig = {
279- contactEmail : 'admin@ example.com' ,
280+ proxyUrl : 'https://proxy. example.com' ,
280281 cookieSecret : 'secret' ,
281282 authentication : [ { type : 'local' , enabled : true } ] ,
282283 sink : [ { type : 'fs' , enabled : true } ] ,
@@ -315,13 +316,14 @@ describe('Generated Config (QuickType)', () => {
315316
316317 it ( 'should test validation error paths' , ( ) => {
317318 assert . throws ( ( ) =>
318- Convert . toGitProxyConfig ( '{"contactEmail ": 123, "authentication": "not-array"}' ) ,
319+ Convert . toGitProxyConfig ( '{"proxyUrl ": 123, "authentication": "not-array"}' ) ,
319320 ) ;
320321 } ) ;
321322
322323 it ( 'should test date and null handling' , ( ) => {
323324 // Test that null values cause validation errors (covers error paths)
324325 const configWithNulls = {
326+ proxyUrl : 'https://proxy.example.com' ,
325327 cookieSecret : null ,
326328 authentication : [ { type : 'local' , enabled : true } ] ,
327329 sink : [ { type : 'fs' , enabled : true } ] ,
@@ -336,7 +338,7 @@ describe('Generated Config (QuickType)', () => {
336338
337339 it ( 'should test serialization back to JSON' , ( ) => {
338340 const testConfig = {
339- contactEmail : 'admin@ test.com' ,
341+ proxyUrl : 'https:// test.com' ,
340342 cookieSecret : 'secret' ,
341343 authentication : [ { type : 'local' , enabled : true } ] ,
342344 sink : [ { type : 'fs' , enabled : true } ] ,
@@ -354,7 +356,7 @@ describe('Generated Config (QuickType)', () => {
354356 const serialized = Convert . gitProxyConfigToJson ( parsed ) ;
355357 const reparsed = JSON . parse ( serialized ) ;
356358
357- expect ( reparsed . contactEmail ) . toBe ( 'admin@ test.com' ) ;
359+ expect ( reparsed . proxyUrl ) . toBe ( 'https:// test.com' ) ;
358360 assert . isObject ( reparsed . rateLimit ) ;
359361 } ) ;
360362
0 commit comments