wasm-rquickjs-cli 0.5.3

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import assert from 'assert';
import googleapisPkg from 'googleapis';

export const run = () => {
  const { google, GoogleApis } = googleapisPkg;

  const g = new GoogleApis();
  const customsearch = g.customsearch('v1');
  const books = google.books('v1');

  assert.strictEqual(typeof g.getSupportedAPIs, 'function');
  assert.strictEqual(typeof customsearch.cse.list, 'function');
  assert.strictEqual(typeof books.volumes.list, 'function');

  return 'PASS: basic googleapis module import and service construction works';
};