@@ -2,14 +2,14 @@ import { basename } from 'pathe'
22import { describe , expect , it } from 'vitest'
33import { PrefixTree , TreeNode } from '../core/tree'
44import { resolveOptions } from '../options'
5- import { generateRouteRecord } from './generateRouteRecords'
5+ import { generateRouteRecords } from './generateRouteRecords'
66import { ImportsMap } from '../core/utils'
77
88const DEFAULT_OPTIONS = resolveOptions ( { } )
99
1010describe ( 'generateRouteRecord' , ( ) => {
1111 function generateRouteRecordSimple ( tree : TreeNode ) {
12- return generateRouteRecord (
12+ return generateRouteRecords (
1313 tree ,
1414 {
1515 ...DEFAULT_OPTIONS ,
@@ -115,7 +115,7 @@ describe('generateRouteRecord', () => {
115115 tree . insert ( 'b' , 'b.vue' )
116116 tree . insert ( 'nested/file/c' , 'nested/file/c.vue' )
117117 const importList = new ImportsMap ( )
118- expect ( generateRouteRecord ( tree , options , importList ) ) . toMatchSnapshot ( )
118+ expect ( generateRouteRecords ( tree , options , importList ) ) . toMatchSnapshot ( )
119119
120120 expect ( importList . toString ( ) ) . toMatchSnapshot ( )
121121 } )
@@ -131,7 +131,7 @@ describe('generateRouteRecord', () => {
131131 tree . insert ( 'b' , 'b.vue' )
132132 tree . insert ( 'nested/file/c' , 'nested/file/c.vue' )
133133 const importList = new ImportsMap ( )
134- expect ( generateRouteRecord ( tree , options , importList ) ) . toMatchSnapshot ( )
134+ expect ( generateRouteRecords ( tree , options , importList ) ) . toMatchSnapshot ( )
135135
136136 expect ( importList . toString ( ) ) . toMatchSnapshot ( )
137137 } )
0 commit comments