mirror of
https://github.com/pezkuwichain/pezkuwi-wasm.git
synced 2026-11-01 07:59:49 +00:00
Lint never ran here: the build step stopped first on @pezkuwi/dev 0.85.7. With it running: - .prettierrc.cjs loaded @polkadot/dev; it is @pezkuwi/dev - license headers on .prettierrc.cjs and scripts/pack-wasm-base.mjs - packages/scure-sr25519/lib holds compiled files only; it is ignored - the wasm-crypto test entries take upstream's form: one @ts-ignore, for the build output that may not exist, with the reason; test globals by reference - three ad-hoc scripts from the 7.5.17 release, referenced nowhere, removed Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// This is a Deno file, so we can allow .ts imports
|
|
/* eslint-disable import/extensions */
|
|
|
|
// NOTE We don't use ts-expect-error here since the build folder may or may
|
|
// not exist (so the error may or may not be there)
|
|
//
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// NOTE We don't use ts-expect-error here since the build folder may or may
|
|
// not exist (so the error may or may not be there)
|
|
//
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore This should only run against the compiled ouput, where this should exist
|
|
import * as wasm from '../build-deno/mod.ts';
|
|
import { initRun, tests } from './all/index.js';
|
|
|
|
type Tests = Record<string, (wasm: unknown) => void>;
|
|
|
|
declare const globalThis: {
|
|
it: (name: string, fn: () => void) => unknown;
|
|
};
|
|
declare const Deno: {
|
|
test: (name: string, test: () => unknown) => unknown;
|
|
};
|
|
|
|
await initRun('wasm', wasm);
|
|
|
|
// We use it to denote the tests
|
|
globalThis.it = (name: string, fn: () => void) => Deno.test(name, () => fn());
|
|
|
|
Object
|
|
.entries<Tests>(tests)
|
|
.forEach(([describeName, tests]) => {
|
|
console.log('***', describeName);
|
|
|
|
Object
|
|
.values(tests)
|
|
.forEach((test) => test(wasm));
|
|
});
|