@@ -25,7 +25,7 @@ const TEST_CONTEXT = (path, configMap) => ({
25
25
} ,
26
26
} ,
27
27
log : console ,
28
- url : new URL ( `https://www.example.com/owner --repo/content${ path } ` ) ,
28
+ url : new URL ( `https://www.example.com/org --repo/content${ path } ` ) ,
29
29
info : {
30
30
method : 'GET' ,
31
31
headers : { } ,
@@ -35,7 +35,7 @@ const TEST_CONTEXT = (path, configMap) => ({
35
35
describe ( 'config tests' , ( ) => {
36
36
it ( 'should extract path params' , async ( ) => {
37
37
const tenantConfigs = {
38
- 'owner --repo' : {
38
+ 'org --repo' : {
39
39
base : {
40
40
apiKey : 'bad' ,
41
41
} ,
@@ -47,21 +47,21 @@ describe('config tests', () => {
47
47
} ;
48
48
const config = await resolveConfig (
49
49
TEST_CONTEXT ( '/us/p/my-url-key/some-sku' , tenantConfigs ) ,
50
- 'owner --repo' ,
50
+ 'org --repo' ,
51
51
) ;
52
52
assert . deepStrictEqual ( config , {
53
53
apiKey : 'good' ,
54
54
params : { urlkey : 'my-url-key' , sku : 'some-sku' } ,
55
55
headers : { } ,
56
56
pageType : 'product' ,
57
- owner : 'owner ' ,
57
+ org : 'org ' ,
58
58
repo : 'repo' ,
59
59
} ) ;
60
60
} ) ;
61
61
62
62
it ( 'should combine headers objects' , async ( ) => {
63
63
const tenantConfigs = {
64
- 'owner --repo' : {
64
+ 'org --repo' : {
65
65
base : {
66
66
apiKey : 'bad' ,
67
67
headers : {
@@ -81,21 +81,21 @@ describe('config tests', () => {
81
81
} ;
82
82
const config = await resolveConfig (
83
83
TEST_CONTEXT ( '/us/p/my-url-key/some-sku' , tenantConfigs ) ,
84
- 'owner --repo' ,
84
+ 'org --repo' ,
85
85
) ;
86
86
assert . deepStrictEqual ( config , {
87
87
apiKey : 'good' ,
88
88
params : { urlkey : 'my-url-key' , sku : 'some-sku' } ,
89
89
headers : { foo : '2' , baz : '1' , bar : '2' } ,
90
90
pageType : 'product' ,
91
- owner : 'owner ' ,
91
+ org : 'org ' ,
92
92
repo : 'repo' ,
93
93
} ) ;
94
94
} ) ;
95
95
96
96
it ( 'should allow wildcard path segments' , async ( ) => {
97
97
const tenantConfigs = {
98
- 'owner --repo' : {
98
+ 'org --repo' : {
99
99
base : {
100
100
apiKey : 'bad' ,
101
101
} ,
@@ -107,21 +107,21 @@ describe('config tests', () => {
107
107
} ;
108
108
const config = await resolveConfig (
109
109
TEST_CONTEXT ( '/us/p/something-here/some-sku' , tenantConfigs ) ,
110
- 'owner --repo' ,
110
+ 'org --repo' ,
111
111
) ;
112
112
assert . deepStrictEqual ( config , {
113
113
apiKey : 'good' ,
114
114
params : { sku : 'some-sku' } ,
115
115
headers : { } ,
116
116
pageType : 'product' ,
117
- owner : 'owner ' ,
117
+ org : 'org ' ,
118
118
repo : 'repo' ,
119
119
} ) ;
120
120
} ) ;
121
121
122
122
it ( 'should allow overrides' , async ( ) => {
123
123
const tenantConfigs = {
124
- 'owner --repo' : {
124
+ 'org --repo' : {
125
125
base : {
126
126
apiKey : 'bad1' ,
127
127
} ,
@@ -133,15 +133,15 @@ describe('config tests', () => {
133
133
} ;
134
134
const config = await resolveConfig (
135
135
TEST_CONTEXT ( '/us/p/some-sku' , tenantConfigs ) ,
136
- 'owner --repo' ,
136
+ 'org --repo' ,
137
137
{ apiKey : 'good' } ,
138
138
) ;
139
139
assert . deepStrictEqual ( config , {
140
140
apiKey : 'good' ,
141
141
params : { sku : 'some-sku' } ,
142
142
pageType : 'product' ,
143
143
headers : { } ,
144
- owner : 'owner ' ,
144
+ org : 'org ' ,
145
145
repo : 'repo' ,
146
146
} ) ;
147
147
} ) ;
0 commit comments