nlcst-test:检查断言 nlcst 节点的实用程序

时间:2024-08-24 07:50:39
【文件属性】:

文件名称:nlcst-test:检查断言 nlcst 节点的实用程序

文件大小:8KB

文件格式:ZIP

更新时间:2024-08-24 07:50:39

test syntax-tree util assert unist

nlcst 测试 实用程序来断言树。 安装 此包 :需要 Node 12+ 才能使用它,并且必须使用import ed 而不是require d。 : npm install nlcst-test 采用 import { assert } from 'nlcst-test' assert ( { type : 'RootNode' , children : [ ] } ) assert ( { type : 'SourceNode' , value : 'fn()' } ) assert ( { type : 'WordNode' , children : [ { type : 'TextNode' , value : 'Hi' } ] } ) // All OK. assert ( { children : [ ] } ) // AssertionError: node shou


【文件预览】:
nlcst-test-main
----.prettierignore(15B)
----.gitignore(57B)
----tsconfig.json(360B)
----.github()
--------workflows()
----test()
--------root.js(563B)
--------index.js(158B)
--------node.js(656B)
--------children.js(1KB)
----package.json(2KB)
----index.test-d.ts(494B)
----readme.md(3KB)
----index.js(2KB)
----.editorconfig(147B)
----license(1KB)
----.npmrc(19B)

网友评论