feat: 增進 app-map
This commit is contained in:
@@ -23,6 +23,13 @@ test('CLI runs doctor and scan against one prototype', async () => {
|
||||
</form>
|
||||
</main>
|
||||
`)
|
||||
await writeFile(join(cwd, 'packages/prototype/portal.md'), `
|
||||
# Portal Guide
|
||||
|
||||
| 雛型檔 | 舊 JSP 來源 | 功能 |
|
||||
| --- | --- | --- |
|
||||
| [\`index.html\`](index.html) | \`legacy/index.jsp\` | Customer portal entry |
|
||||
`)
|
||||
|
||||
const doctor = await exec('node', [cli, 'doctor'], { cwd })
|
||||
await exec('node', [cli, 'scan'], { cwd })
|
||||
@@ -45,6 +52,9 @@ test('CLI runs doctor and scan against one prototype', async () => {
|
||||
assert.equal(appMap.routes[0].prototype, 'index.html')
|
||||
assert.equal(appMap.routes[0].kind, 'feature-page')
|
||||
assert.equal(appMap.routes[0].layout, 'template-app')
|
||||
assert.equal(appMap.routes[0].guide.legacyJsp, 'legacy/index.jsp')
|
||||
assert.equal(appMap.routes[0].guide.description, 'Customer portal entry')
|
||||
assert.equal(appMap.guideSources[0].source, 'portal.md')
|
||||
})
|
||||
|
||||
test('CLI help only exposes MVP commands', async () => {
|
||||
|
||||
Reference in New Issue
Block a user