File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,15 @@ import { cases } from './cases';
99import { Case } from './cases/abstract' ;
1010import { TsJsonValidatorCase } from './cases/ts-json-validator' ;
1111import { MarshalCase } from './cases/marshal' ;
12+ import { SuretypeCase } from './cases/suretype' ;
1213
1314const caseInstances : Case [ ] = cases . map ( caseClass => new caseClass ( DATA ) ) ;
1415
1516const RESULTS_DIR = join ( __dirname , 'results' ) ;
1617const NODE_VERSION = process . env . NODE_VERSION || process . version ;
1718
19+ const OUTLIERS = [ MarshalCase , TsJsonValidatorCase , SuretypeCase ] ;
20+
1821async function main ( ) {
1922 await suiteDataTypeValidation ( ) ;
2023 await suiteDataTypeValidationSansOutliers ( ) ;
@@ -37,9 +40,9 @@ async function suiteDataTypeValidation() {
3740 * https://en.wikipedia.org/wiki/Data_validation#Data-type_check
3841 */
3942async function suiteDataTypeValidationSansOutliers ( ) {
40- const cases = caseInstances
41- . filter ( caseInstance => ! ( caseInstance instanceof MarshalCase ) )
42- . filter ( caseInstance => ! ( caseInstance instanceof TsJsonValidatorCase ) ) ;
43+ const cases = caseInstances . filter ( caseInstance =>
44+ OUTLIERS . some ( OutlierCase => caseInstance instanceof OutlierCase )
45+ ) ;
4346
4447 await run ( 'data-type-sans-outliers' , cases , 'validate' ) ;
4548}
You can’t perform that action at this time.
0 commit comments