Skip to content

Commit 27790cf

Browse files
committed
✅ Add a test for PHP
1 parent 91e3d19 commit 27790cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/php/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
const path = require('node:path')
45

@@ -9,6 +10,9 @@ setup({
910
src: path.join('php', 'src'),
1011
languageRegistration,
1112
testRunner: parse => {
12-
// add test here
13+
const sg = parse('123')
14+
const root = sg.root()
15+
const node = root.find('123')
16+
assert.equal(node.kind(), 'text')
1317
},
1418
})

0 commit comments

Comments
 (0)