Skip to content

Commit 856c768

Browse files
committed
✅ Add test for Dart
1 parent 77c8167 commit 856c768

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/dart/nursery.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { setup } = require('@ast-grep/nursery')
2+
const assert = require('node:assert')
23
const languageRegistration = require('./index')
34

45
setup({
@@ -7,6 +8,9 @@ setup({
78
treeSitterPackage: 'tree-sitter-dart',
89
languageRegistration,
910
testRunner: parse => {
10-
// add test here
11+
const sg = parse('var a = 123;')
12+
const root = sg.root()
13+
const node = root.find('a')
14+
assert.equal(node.kind(), 'identifier')
1115
},
1216
})

0 commit comments

Comments
 (0)