e0a5f57793
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
32 lines
927 B
TypeScript
32 lines
927 B
TypeScript
import { getMarkdown, parseMarkdownToStructure } from 'stream-markdown-parser'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
const md = getMarkdown()
|
|
|
|
describe('ordered list start parsing', () => {
|
|
it('captures start on second ordered list separated by code block', () => {
|
|
const markdown = [
|
|
'1. First, let\'s set up the project:',
|
|
'',
|
|
'```',
|
|
'code',
|
|
'```',
|
|
'',
|
|
'2. Create the main Electron file:',
|
|
].join('\n')
|
|
|
|
const nodes = parseMarkdownToStructure(markdown, md)
|
|
// find list nodes
|
|
const lists = nodes.filter(n => n.type === 'list')
|
|
expect(lists.length).toBe(2)
|
|
const first = lists[0] as any
|
|
const second = lists[1] as any
|
|
|
|
expect(first.ordered).toBe(true)
|
|
expect(first.start === undefined || first.start === 1).toBeTruthy()
|
|
expect(second.ordered).toBe(true)
|
|
// second should have start=2
|
|
expect(second.start).toBe(2)
|
|
})
|
|
})
|