-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acfab54
commit 3e688f0
Showing
6 changed files
with
1,016 additions
and
931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import { assertType, test } from 'vitest' | ||
import { assertType, test } from "vitest"; | ||
|
||
import type { ResolvedConfig } from './config.js' | ||
import type { ResolvedConfig } from "./config.js"; | ||
|
||
// For testing updates to config properties: | ||
// declare module './config.js' { | ||
// declare module "./config.js" { | ||
// export interface Config { | ||
// Strict: true | ||
// Strict: true; | ||
// } | ||
// } | ||
|
||
test('Config', () => { | ||
assertType<ResolvedConfig['ArrayMaxDepth']>(false) | ||
assertType<ResolvedConfig['FixedArrayMinLength']>(1) | ||
assertType<ResolvedConfig['FixedArrayMaxLength']>(99) | ||
test("Config", () => { | ||
assertType<ResolvedConfig["ArrayMaxDepth"]>(false); | ||
assertType<ResolvedConfig["FixedArrayMinLength"]>(1); | ||
assertType<ResolvedConfig["FixedArrayMaxLength"]>(99); | ||
|
||
type AddressType = ResolvedConfig['AddressType'] | ||
assertType<AddressType>('0x0000000000000000000000000000000000000000') | ||
type AddressType = ResolvedConfig["AddressType"]; | ||
assertType<AddressType>("0x0000000000000000000000000000000000000000"); | ||
|
||
type BytesType = ResolvedConfig['BytesType'] | ||
type BytesType = ResolvedConfig["BytesType"]; | ||
assertType<BytesType>({ | ||
inputs: '0xfoobarbaz', | ||
outputs: '0xfoobarbaz', | ||
}) | ||
inputs: "0xfoobarbaz", | ||
outputs: "0xfoobarbaz", | ||
}); | ||
|
||
type IntType = ResolvedConfig['IntType'] | ||
assertType<IntType>(123) | ||
type IntType = ResolvedConfig["IntType"]; | ||
assertType<IntType>(123); | ||
|
||
type BigIntType = ResolvedConfig['BigIntType'] | ||
assertType<BigIntType>(123n) | ||
type BigIntType = ResolvedConfig["BigIntType"]; | ||
assertType<BigIntType>(123n); | ||
|
||
type Strict = ResolvedConfig['Strict'] | ||
assertType<Strict>(false) | ||
}) | ||
type Strict = ResolvedConfig["Strict"]; | ||
assertType<Strict>(false); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.