Move tests to TypeScript (coverage is still JS based)

This commit is contained in:
junderw 2019-09-07 13:42:03 +09:00
parent 11e4a12caf
commit 6c08a0be40
No known key found for this signature in database
GPG key ID: B256185D3A971908
41 changed files with 3920 additions and 2712 deletions

View file

@ -38,7 +38,7 @@ function classifyOutput(script: Buffer): string {
return types.NONSTANDARD;
}
function classifyInput(script: Buffer, allowIncomplete: boolean): string {
function classifyInput(script: Buffer, allowIncomplete?: boolean): string {
// XXX: optimization, below functions .decompile before use
const chunks = decompile(script);
if (!chunks) throw new TypeError('Invalid script');
@ -51,7 +51,7 @@ function classifyInput(script: Buffer, allowIncomplete: boolean): string {
return types.NONSTANDARD;
}
function classifyWitness(script: Buffer[], allowIncomplete: boolean): string {
function classifyWitness(script: Buffer[], allowIncomplete?: boolean): string {
// XXX: optimization, below functions .decompile before use
const chunks = decompile(script);
if (!chunks) throw new TypeError('Invalid script');