docs(napi): Remove JSON.parse from example (#6836)

Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
This commit is contained in:
ottomated 2024-10-24 06:49:44 -07:00 committed by GitHub
parent 67a7bde4c6
commit 99e3b32d43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,8 +15,7 @@ test(oxc.parseSync(sourceText, options));
test(await oxc.parseAsync(sourceText, options));
function test(ret) {
const program = JSON.parse(ret.program);
assert(program.body.length == 1);
assert(ret.program.body.length == 1);
assert(ret.errors.length == 0);
}
```