mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
docs(napi): Remove JSON.parse from example (#6836)
Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
This commit is contained in:
parent
67a7bde4c6
commit
99e3b32d43
1 changed files with 1 additions and 2 deletions
|
|
@ -15,8 +15,7 @@ test(oxc.parseSync(sourceText, options));
|
||||||
test(await oxc.parseAsync(sourceText, options));
|
test(await oxc.parseAsync(sourceText, options));
|
||||||
|
|
||||||
function test(ret) {
|
function test(ret) {
|
||||||
const program = JSON.parse(ret.program);
|
assert(ret.program.body.length == 1);
|
||||||
assert(program.body.length == 1);
|
|
||||||
assert(ret.errors.length == 0);
|
assert(ret.errors.length == 0);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue