@@ -27,13 +27,6 @@ const manifest = {
2727 ]
2828}
2929
30- const flags = {
31- bind : 'localhost' ,
32- port : 1000 ,
33- logs : true ,
34- livereload : false
35- }
36-
3730describe ( 'migrate' , ( ) => {
3831 beforeEach ( ( ) => {
3932 sinon . restore ( )
@@ -56,16 +49,16 @@ describe('migrate', () => {
5649 'custom_pages/faq' : '<h1>FAQ</h1>'
5750 } )
5851
59- getVariablesStub . withArgs ( 'theme/path' , manifest . settings , flags ) . returns ( [
52+ getVariablesStub . withArgs ( 'theme/path' , manifest . settings ) . returns ( [
6053 { identifier : 'color' , type : 'color' , value : '#999' } ,
6154 {
6255 identifier : 'logo' ,
6356 type : 'file' ,
64- value : 'http://localhost:1000/guide/settings/ logo.png'
57+ value : 'logo.png'
6558 }
6659 ] )
6760
68- getAssetsStub . withArgs ( 'theme/path' , flags ) . returns ( [
61+ getAssetsStub . withArgs ( 'theme/path' ) . returns ( [
6962 [
7063 {
7164 base : 'background.png' ,
@@ -74,7 +67,7 @@ describe('migrate', () => {
7467 name : 'background' ,
7568 root : ''
7669 } ,
77- 'http://localhost:1000/guide/assets/ background.png'
70+ 'background.png'
7871 ]
7972 ] )
8073
@@ -98,7 +91,7 @@ describe('migrate', () => {
9891 } ) as axios . AxiosPromise
9992 )
10093
101- await migrate ( 'theme/path' , flags )
94+ await migrate ( 'theme/path' )
10295
10396 expect (
10497 requestStub . calledWith (
@@ -114,12 +107,11 @@ describe('migrate', () => {
114107 'article_pages/product_updates' : '<h1>Product updates</h1>' ,
115108 'custom_pages/faq' : '<h1>FAQ</h1>' ,
116109 assets : {
117- 'background.png' :
118- 'http://localhost:1000/guide/assets/background.png'
110+ 'background.png' : 'background.png'
119111 } ,
120112 variables : {
121113 color : '#999' ,
122- logo : 'http://localhost:1000/guide/settings/ logo.png'
114+ logo : 'logo.png'
123115 } ,
124116 metadata : { api_version : 1 }
125117 }
@@ -178,7 +170,7 @@ describe('migrate', () => {
178170 const errorStub = sinon . stub ( errors , 'error' ) . callThrough ( )
179171
180172 try {
181- await migrate ( 'theme/path' , flags )
173+ await migrate ( 'theme/path' )
182174 } catch {
183175 const [ call ] = errorStub . getCalls ( )
184176 const [ error ] = call . args
@@ -206,7 +198,7 @@ describe('migrate', () => {
206198 const errorStub = sinon . stub ( errors , 'error' ) . callThrough ( )
207199
208200 try {
209- await migrate ( 'theme/path' , flags )
201+ await migrate ( 'theme/path' )
210202 } catch {
211203 const [ call ] = errorStub . getCalls ( )
212204 const [ error ] = call . args
@@ -230,7 +222,7 @@ describe('migrate', () => {
230222 const errorStub = sinon . stub ( errors , 'error' ) . callThrough ( )
231223
232224 try {
233- await migrate ( 'theme/path' , flags )
225+ await migrate ( 'theme/path' )
234226 } catch {
235227 const [ call ] = errorStub . getCalls ( )
236228 const [ error ] = call . args
@@ -250,7 +242,7 @@ describe('migrate', () => {
250242 const errorStub = sinon . stub ( errors , 'error' ) . callThrough ( )
251243
252244 try {
253- await migrate ( 'theme/path' , flags )
245+ await migrate ( 'theme/path' )
254246 } catch {
255247 const [ call ] = errorStub . getCalls ( )
256248 const [ error ] = call . args
0 commit comments