@@ -32,8 +32,8 @@ const testSuite = () => {
3232 const call = addTemplate . mock . calls . find ( args => args [ 0 ] . src . includes ( 'plugin.js' ) )
3333 const options = call [ 0 ] . options
3434 const proto = options . https ? 'https' : 'http'
35- expect ( options . baseURL . toString ( ) ) . toBe ( `${ proto } ://localhost:3000/test_api ` )
36- expect ( options . browserBaseURL . toString ( ) ) . toBe ( '/test_api ' )
35+ expect ( options . baseURL . toString ( ) ) . toBe ( `${ proto } ://localhost:3000/api/test ` )
36+ expect ( options . browserBaseURL . toString ( ) ) . toBe ( '/api/test ' )
3737 } )
3838
3939 test ( 'asyncData' , async ( ) => {
@@ -121,7 +121,7 @@ describe('module', () => {
121121describe ( 'other options' , ( ) => {
122122 beforeAll ( async ( ) => {
123123 config . axios = {
124- prefix : '/test_api ' ,
124+ prefix : '/api/test ' ,
125125 proxy : { } ,
126126 credentials : true ,
127127 https : true ,
@@ -141,7 +141,7 @@ describe('other options', () => {
141141describe ( 'browserBaseURL' , ( ) => {
142142 beforeAll ( async ( ) => {
143143 config . axios = {
144- browserBaseURL : '/test_api '
144+ browserBaseURL : '/api/test '
145145 }
146146
147147 await setupNuxt ( config )
@@ -156,7 +156,7 @@ describe('browserBaseURL', () => {
156156 const call = addTemplate . mock . calls . find ( args => args [ 0 ] . src . includes ( 'plugin.js' ) )
157157 const options = call [ 0 ] . options
158158 expect ( options . baseURL . toString ( ) ) . toBe ( 'http://localhost:3000/' )
159- expect ( options . browserBaseURL . toString ( ) ) . toBe ( '/test_api ' )
159+ expect ( options . browserBaseURL . toString ( ) ) . toBe ( '/api/test ' )
160160 } )
161161} )
162162
0 commit comments