mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
19 lines
388 B
JavaScript
19 lines
388 B
JavaScript
import oxc from './index.js';
|
|
import assert from 'assert';
|
|
|
|
console.log(`Testing on ${process.platform}-${process.arch}`)
|
|
|
|
function test(ret) {
|
|
console.log(ret.program);
|
|
console.log(ret.errors);
|
|
assert(JSON.parse(ret.program).body.length == 1);
|
|
assert(ret.errors.length == 0);
|
|
}
|
|
|
|
test(oxc.parseSync("foo"));
|
|
|
|
async function main() {
|
|
test(await oxc.parseAsync("foo"));
|
|
}
|
|
|
|
main()
|