summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/jsapi/idlharness.any.js
blob: 98713d4bf6e43af90c705e55c59be277463b9e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: script=../resources/load_wasm.js

'use strict';

// https://webassembly.github.io/spec/js-api/

idl_test(
  ['wasm-js-api'],
  [],
  async idl_array => {
    self.mod = await createWasmModule();
    self.instance = new WebAssembly.Instance(self.mod);

    idl_array.add_objects({
      Memory: [new WebAssembly.Memory({initial: 1024})],
      Module: [self.mod],
      Instance: [self.instance],
    });
  }
);