refactor(packages/*): add tuono- prefix to all relevant folders (#255)

This commit is contained in:
Marco Pasqualetti
2024-12-23 18:28:06 +01:00
committed by GitHub
parent f236b75f55
commit f3bf13da59
88 changed files with 122 additions and 122 deletions
@@ -0,0 +1,31 @@
import fs from 'fs/promises'
import { describe, it, expect } from 'vitest'
import { routeGenerator } from '../src/generator'
describe('generator works', async () => {
const folderNames = await fs.readdir(`${process.cwd()}/tests/generator`)
it.each(folderNames)(
'should wire-up the routes for a "%s" tree',
async (folderName) => {
const testDirPath = `${process.cwd()}/tests/generator/${folderName}`
await routeGenerator({
folderName: `${testDirPath}/routes`,
generatedRouteTree: `${testDirPath}/routeTree.gen.ts`,
})
const generatedFilePath = `${testDirPath}/routeTree.gen.ts`
const expectedFilePath = `${testDirPath}/routeTree.expected.ts`
const generatedFileContent = await fs.readFile(generatedFilePath, 'utf-8')
await expect(generatedFileContent).toMatchFileSnapshot(
expectedFilePath,
`${generatedFilePath} content should be equal to ${expectedFilePath}`,
)
},
)
})