We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49f85a9 commit 1f7c972Copy full SHA for 1f7c972
packages/javascript/nursery.js
@@ -1,4 +1,5 @@
1
const { setup } = require('@ast-grep/nursery')
2
+const assert = require('node:assert')
3
const languageRegistration = require('./index')
4
5
setup({
@@ -7,6 +8,9 @@ setup({
7
8
treeSitterPackage: 'tree-sitter-javascript',
9
languageRegistration,
10
testRunner: parse => {
- // add test here
11
+ const sg = parse('const a = 123')
12
+ const root = sg.root()
13
+ const node = root.find('const $A = 123')
14
+ assert.equal(node.kind(), 'lexical_declaration')
15
},
16
})
0 commit comments