Files
wasm/packages/wasm-crypto/test/asm.js
T
Jaco Greeff 8c6d2aea12 Only rely on wasm.js (no asm.js duplication) (#25)
* Only rely on wasm.js (no asm.js duplication)

* Add browser entry

* Make asm.js tests pass

* Remove (now-unsued) mock dep
2019-07-19 11:06:31 +02:00

29 lines
667 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
// Copyright 2019 @polkadot/wasm-crypto authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// @ts-check
// @ts-ignore
global.WebAssembly = null;
require('override-require')(
(request) => request === './wasm_asm_stub',
// @ts-ignore
() => require('../build/wasm_asm')
);
// @ts-ignore
const wasm = require('../build/index');
const { beforeAll, runAll } = require('./all')(wasm);
(async () => {
await beforeAll();
runAll();
})().catch((error) => {
console.error(error);
process.exit(-1);
});