feat(web): add missing API functions

Co-authored-by: Will Lillis <will.lillis24@gmail.com>
This commit is contained in:
Amaan Qureshi 2025-01-05 22:06:33 -05:00
parent dcdd6ce2d2
commit 45fa028201
11 changed files with 436 additions and 35 deletions

View file

@ -4,6 +4,13 @@ let JavaScript;
describe('Language', () => {
before(async () => ({JavaScript, Rust} = await require('./helper')));
describe('.name, .version', () => {
it('returns the name and version of the language', () => {
assert.equal('javascript', JavaScript.name);
assert.equal(15, JavaScript.version);
});
});
describe('.fieldIdForName, .fieldNameForId', () => {
it('converts between the string and integer representations of fields', () => {
const nameId = JavaScript.fieldIdForName('name');