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.
28 lines
781 B
TypeScript
28 lines
781 B
TypeScript
import { isMathLike } from 'stream-markdown-parser'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
describe('isMathLike heuristic', () => {
|
|
it('detects TeX commands', () => {
|
|
expect(isMathLike('\\frac{a}{b}')).toBe(true)
|
|
expect(isMathLike('\\alpha + x')).toBe(true)
|
|
})
|
|
|
|
it('detects function-like patterns', () => {
|
|
expect(isMathLike('f(x)')).toBe(true)
|
|
expect(isMathLike('sin(x) + cos(y)')).toBe(true)
|
|
})
|
|
|
|
it('detects superscripts and subscripts', () => {
|
|
expect(isMathLike('x^2 + y_1')).toBe(true)
|
|
})
|
|
|
|
it('detects operators', () => {
|
|
expect(isMathLike('a + b = c')).toBe(true)
|
|
})
|
|
|
|
it('rejects non-math text', () => {
|
|
expect(isMathLike('This is a normal sentence.')).toBe(false)
|
|
expect(isMathLike('[1, 2, 3]')).toBe(false)
|
|
})
|
|
})
|