9
9
10
10
import { join } from 'node:path'
11
11
import { test } from '@japa/runner'
12
+ import string from '@poppinss/utils/string'
12
13
import { RoutesScanner } from '../../src/code_scanners/routes_scanner/main.ts'
13
14
14
15
test . group ( 'Routes scanner' , ( ) => {
@@ -139,7 +140,7 @@ test.group('Routes scanner', () => {
139
140
},
140
141
"method": "index",
141
142
"name": "UsersController",
142
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
143
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
143
144
},
144
145
"domain": "root",
145
146
"methods": [
@@ -165,7 +166,7 @@ test.group('Routes scanner', () => {
165
166
},
166
167
"method": "create",
167
168
"name": "UsersController",
168
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
169
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
169
170
},
170
171
"domain": "root",
171
172
"methods": [
@@ -191,7 +192,7 @@ test.group('Routes scanner', () => {
191
192
},
192
193
"method": "store",
193
194
"name": "UsersController",
194
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
195
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
195
196
},
196
197
"domain": "root",
197
198
"methods": [
@@ -230,7 +231,7 @@ test.group('Routes scanner', () => {
230
231
},
231
232
"method": "edit",
232
233
"name": "UsersController",
233
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
234
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
234
235
},
235
236
"domain": "root",
236
237
"methods": [
@@ -256,7 +257,7 @@ test.group('Routes scanner', () => {
256
257
},
257
258
"method": "update",
258
259
"name": "UsersController",
259
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
260
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
260
261
},
261
262
"domain": "root",
262
263
"methods": [
@@ -435,7 +436,7 @@ test.group('Routes scanner', () => {
435
436
},
436
437
"method": "index",
437
438
"name": "UsersController",
438
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
439
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
439
440
},
440
441
"domain": "root",
441
442
"methods": [
@@ -461,7 +462,7 @@ test.group('Routes scanner', () => {
461
462
},
462
463
"method": "create",
463
464
"name": "UsersController",
464
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
465
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
465
466
},
466
467
"domain": "root",
467
468
"methods": [
@@ -487,7 +488,7 @@ test.group('Routes scanner', () => {
487
488
},
488
489
"method": "store",
489
490
"name": "UsersController",
490
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
491
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
491
492
},
492
493
"domain": "root",
493
494
"methods": [
@@ -528,7 +529,7 @@ test.group('Routes scanner', () => {
528
529
},
529
530
"method": "edit",
530
531
"name": "UsersController",
531
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
532
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
532
533
},
533
534
"domain": "root",
534
535
"methods": [
@@ -554,7 +555,7 @@ test.group('Routes scanner', () => {
554
555
},
555
556
"method": "update",
556
557
"name": "UsersController",
557
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
558
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
558
559
},
559
560
"domain": "root",
560
561
"methods": [
@@ -715,7 +716,7 @@ test.group('Routes scanner', () => {
715
716
},
716
717
"method": "index",
717
718
"name": "UsersController",
718
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
719
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
719
720
},
720
721
"domain": "root",
721
722
"methods": [
@@ -741,7 +742,7 @@ test.group('Routes scanner', () => {
741
742
},
742
743
"method": "create",
743
744
"name": "UsersController",
744
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
745
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
745
746
},
746
747
"domain": "root",
747
748
"methods": [
@@ -767,7 +768,7 @@ test.group('Routes scanner', () => {
767
768
},
768
769
"method": "store",
769
770
"name": "UsersController",
770
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
771
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
771
772
},
772
773
"domain": "root",
773
774
"methods": [
@@ -806,7 +807,7 @@ test.group('Routes scanner', () => {
806
807
},
807
808
"method": "edit",
808
809
"name": "UsersController",
809
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
810
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
810
811
},
811
812
"domain": "root",
812
813
"methods": [
@@ -832,7 +833,7 @@ test.group('Routes scanner', () => {
832
833
},
833
834
"method": "update",
834
835
"name": "UsersController",
835
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
836
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
836
837
},
837
838
"domain": "root",
838
839
"methods": [
@@ -987,7 +988,7 @@ test.group('Routes scanner', () => {
987
988
},
988
989
"method": "index",
989
990
"name": "UsersController",
990
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
991
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
991
992
},
992
993
"domain": "root",
993
994
"methods": [
@@ -1013,7 +1014,7 @@ test.group('Routes scanner', () => {
1013
1014
},
1014
1015
"method": "store",
1015
1016
"name": "UsersController",
1016
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
1017
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
1017
1018
},
1018
1019
"domain": "root",
1019
1020
"methods": [
@@ -1052,7 +1053,7 @@ test.group('Routes scanner', () => {
1052
1053
},
1053
1054
"method": "index",
1054
1055
"name": "PostsController",
1055
- "path": "${ join ( fs . basePath , '/app/controllers/posts_controller.ts' ) } ",
1056
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/posts_controller.ts' ) ) } ",
1056
1057
},
1057
1058
"domain": "root",
1058
1059
"methods": [
@@ -1078,7 +1079,7 @@ test.group('Routes scanner', () => {
1078
1079
},
1079
1080
"method": "store",
1080
1081
"name": "PostsController",
1081
- "path": "${ join ( fs . basePath , '/app/controllers/posts_controller.ts' ) } ",
1082
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/posts_controller.ts' ) ) } ",
1082
1083
},
1083
1084
"domain": "root",
1084
1085
"methods": [
@@ -1167,7 +1168,7 @@ test.group('Routes scanner', () => {
1167
1168
},
1168
1169
"method": "index",
1169
1170
"name": "UsersController",
1170
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
1171
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
1171
1172
},
1172
1173
"domain": "root",
1173
1174
"methods": [
@@ -1193,7 +1194,7 @@ test.group('Routes scanner', () => {
1193
1194
},
1194
1195
"method": "store",
1195
1196
"name": "UsersController",
1196
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
1197
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
1197
1198
},
1198
1199
"domain": "root",
1199
1200
"methods": [
@@ -1232,7 +1233,7 @@ test.group('Routes scanner', () => {
1232
1233
},
1233
1234
"method": "index",
1234
1235
"name": "PostsController",
1235
- "path": "${ join ( fs . basePath , '/app/controllers/posts_controller.ts' ) } ",
1236
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/posts_controller.ts' ) ) } ",
1236
1237
},
1237
1238
"domain": "root",
1238
1239
"methods": [
@@ -1258,7 +1259,7 @@ test.group('Routes scanner', () => {
1258
1259
},
1259
1260
"method": "store",
1260
1261
"name": "PostsController",
1261
- "path": "${ join ( fs . basePath , '/app/controllers/posts_controller.ts' ) } ",
1262
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/posts_controller.ts' ) ) } ",
1262
1263
},
1263
1264
"domain": "root",
1264
1265
"methods": [
@@ -1303,7 +1304,7 @@ test.group('Routes scanner', () => {
1303
1304
},
1304
1305
"method": "index",
1305
1306
"name": "UsersController",
1306
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
1307
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
1307
1308
},
1308
1309
"domain": "root",
1309
1310
"methods": [
@@ -1329,7 +1330,7 @@ test.group('Routes scanner', () => {
1329
1330
},
1330
1331
"method": "store",
1331
1332
"name": "UsersController",
1332
- "path": "${ join ( fs . basePath , '/app/controllers/users_controller.ts' ) } ",
1333
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/users_controller.ts' ) ) } ",
1333
1334
},
1334
1335
"domain": "root",
1335
1336
"methods": [
@@ -1368,7 +1369,7 @@ test.group('Routes scanner', () => {
1368
1369
},
1369
1370
"method": "index",
1370
1371
"name": "PostsController",
1371
- "path": "${ join ( fs . basePath , '/app/controllers/posts_controller.ts' ) } ",
1372
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/posts_controller.ts' ) ) } ",
1372
1373
},
1373
1374
"domain": "root",
1374
1375
"methods": [
@@ -1394,7 +1395,7 @@ test.group('Routes scanner', () => {
1394
1395
},
1395
1396
"method": "store",
1396
1397
"name": "PostsController",
1397
- "path": "${ join ( fs . basePath , '/app/controllers/posts_controller.ts' ) } ",
1398
+ "path": "${ string . toUnixSlash ( join ( fs . basePath , '/app/controllers/posts_controller.ts' ) ) } ",
1398
1399
},
1399
1400
"domain": "root",
1400
1401
"methods": [
0 commit comments