Skip to content

Commit b4c1bbe

Browse files
committed
✅ Add test for Kotlin
1 parent 7c81212 commit b4c1bbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: packages/kotlin/nursery.js

+5-1
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-kotlin',
89
languageRegistration,
910
testRunner: parse => {
10-
// add test here
11+
const sg = parse('println(123)')
12+
const root = sg.root()
13+
const node = root.find('println($A)')
14+
assert.equal(node.kind(), 'call_expression')
1115
},
1216
})

0 commit comments

Comments
 (0)