Skip to content

Commit e6212a2

Browse files
committed
Fix: The test expectations don\'t match the new implementation of getWorkflowDirs()\. The mock provides scanDirs which the new code no longer uses\, and the new implementation adds scanning of routesDir and apiDir instead\.
1 parent 1e174c9 commit e6212a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/nitro/test/dirs.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const nitroMock = (dirs: string[]) => {
1515
describe('nitro:getWorkflowDirs', () => {
1616
test('default dirs', () => {
1717
const result = getWorkflowDirs(nitroMock([]));
18-
expect(result).toEqual(['/root/server/workflows', '/root/workflows']);
18+
expect(result).toEqual(['/root/api', '/root/routes', '/root/workflows']);
1919
});
2020

2121
test('custom dirs', () => {
@@ -24,8 +24,9 @@ describe('nitro:getWorkflowDirs', () => {
2424
);
2525
expect(result).toEqual([
2626
'/custom/dir2',
27+
'/root/api',
2728
'/root/relative/dir1',
28-
'/root/server/workflows',
29+
'/root/routes',
2930
'/root/workflows',
3031
]);
3132
});

0 commit comments

Comments
 (0)