mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
test: verify dist WASM files exist (#3048)
Add test to verify presence of all required WASM files in dist directory: - tiktoken_bg.wasm for tokenization - tree-sitter.wasm core parser - Language-specific tree-sitter WASM files for syntax highlighting Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org> Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
parent
664d5b1dd5
commit
f120de6a34
1 changed files with 57 additions and 0 deletions
57
src/__tests__/dist_assets.test.ts
Normal file
57
src/__tests__/dist_assets.test.ts
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import * as fs from "fs"
|
||||
import * as path from "path"
|
||||
|
||||
describe("dist assets", () => {
|
||||
const distPath = path.join(__dirname, "../../dist")
|
||||
|
||||
describe("tiktoken", () => {
|
||||
it("should have tiktoken wasm file", () => {
|
||||
expect(fs.existsSync(path.join(distPath, "tiktoken_bg.wasm"))).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe("tree-sitter", () => {
|
||||
const treeSitterFiles = [
|
||||
"tree-sitter-bash.wasm",
|
||||
"tree-sitter-cpp.wasm",
|
||||
"tree-sitter-c_sharp.wasm",
|
||||
"tree-sitter-css.wasm",
|
||||
"tree-sitter-c.wasm",
|
||||
"tree-sitter-elisp.wasm",
|
||||
"tree-sitter-elixir.wasm",
|
||||
"tree-sitter-elm.wasm",
|
||||
"tree-sitter-embedded_template.wasm",
|
||||
"tree-sitter-go.wasm",
|
||||
"tree-sitter-html.wasm",
|
||||
"tree-sitter-javascript.wasm",
|
||||
"tree-sitter-java.wasm",
|
||||
"tree-sitter-json.wasm",
|
||||
"tree-sitter-kotlin.wasm",
|
||||
"tree-sitter-lua.wasm",
|
||||
"tree-sitter-objc.wasm",
|
||||
"tree-sitter-ocaml.wasm",
|
||||
"tree-sitter-php.wasm",
|
||||
"tree-sitter-python.wasm",
|
||||
"tree-sitter-ql.wasm",
|
||||
"tree-sitter-rescript.wasm",
|
||||
"tree-sitter-ruby.wasm",
|
||||
"tree-sitter-rust.wasm",
|
||||
"tree-sitter-scala.wasm",
|
||||
"tree-sitter-solidity.wasm",
|
||||
"tree-sitter-swift.wasm",
|
||||
"tree-sitter-systemrdl.wasm",
|
||||
"tree-sitter-tlaplus.wasm",
|
||||
"tree-sitter-toml.wasm",
|
||||
"tree-sitter-tsx.wasm",
|
||||
"tree-sitter-typescript.wasm",
|
||||
"tree-sitter-vue.wasm",
|
||||
"tree-sitter.wasm",
|
||||
"tree-sitter-yaml.wasm",
|
||||
"tree-sitter-zig.wasm",
|
||||
]
|
||||
|
||||
test.each(treeSitterFiles)("should have %s file", (filename) => {
|
||||
expect(fs.existsSync(path.join(distPath, filename))).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Reference in a new issue