|
1 | 1 | import fs from "node:fs";
|
2 | 2 | import path from "node:path";
|
3 |
| -import {expect, it, vi} from "vitest"; |
| 3 | +import {it, vi} from "vitest"; |
4 | 4 | import {Type} from "@chainsafe/ssz";
|
5 | 5 | import {ssz} from "@lodestar/types";
|
6 | 6 | import {ACTIVE_PRESET, ForkName, ForkLightClient, ForkExecution} from "@lodestar/params";
|
@@ -58,24 +58,22 @@ const sszStatic =
|
58 | 58 | (ssz.phase0 as Types)[typeName];
|
59 | 59 |
|
60 | 60 | if (!sszType) {
|
61 |
| - expect.fail( |
62 |
| - `Missing SSZ type definition for ${typeName}; this will prevent associated ssz_static tests to be executed` |
63 |
| - ); |
64 |
| - } else { |
65 |
| - const sszTypeNoUint = replaceUintTypeWithUintBigintType(sszType); |
| 61 | + throw Error(`Missing SSZ type ${typeName} for fork ${fork}`); |
| 62 | + } |
| 63 | + |
| 64 | + const sszTypeNoUint = replaceUintTypeWithUintBigintType(sszType); |
66 | 65 |
|
67 |
| - for (const testCase of fs.readdirSync(testSuiteDirpath)) { |
68 |
| - // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts |
69 |
| - it(testCase, function () { |
70 |
| - // Mainnet must deal with big full states and hash each one multiple times |
71 |
| - if (ACTIVE_PRESET === "mainnet") { |
72 |
| - vi.setConfig({testTimeout: 30 * 1000}); |
73 |
| - } |
| 66 | + for (const testCase of fs.readdirSync(testSuiteDirpath)) { |
| 67 | + // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts |
| 68 | + it(testCase, function () { |
| 69 | + // Mainnet must deal with big full states and hash each one multiple times |
| 70 | + if (ACTIVE_PRESET === "mainnet") { |
| 71 | + vi.setConfig({testTimeout: 30 * 1000}); |
| 72 | + } |
74 | 73 |
|
75 |
| - const testData = parseSszStaticTestcase(path.join(testSuiteDirpath, testCase)); |
76 |
| - runValidSszTest(sszTypeNoUint, testData); |
77 |
| - }); |
78 |
| - } |
| 74 | + const testData = parseSszStaticTestcase(path.join(testSuiteDirpath, testCase)); |
| 75 | + runValidSszTest(sszTypeNoUint, testData); |
| 76 | + }); |
79 | 77 | }
|
80 | 78 | };
|
81 | 79 |
|
|
0 commit comments