File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,19 @@ import fs from "fs";
55import yaml from "js-yaml" ;
66import lodash from "lodash" ;
77
8+ import { JSONSchemasInterface } from "../../src/JSONSchemasInterface" ;
89import { combineType , esseType } from "../../src/utils/yaml" ;
910import { YAML_COMBINE_FILE } from "../enums" ;
11+ import { MOCK_GLOBAL_SCHEMA } from "../fixtures/mock_esse_schema" ;
1012
1113const combineSchema = yaml . DEFAULT_SCHEMA . extend ( [ combineType , esseType ] ) ;
1214
1315describe ( "YAML tag: !combine" , ( ) => {
1416 let yamlFixture ;
1517 let parsed ;
1618
17- // eslint-disable-next-line func-names
18- before ( function ( ) {
19- this . timeout ( 5000 ) ;
19+ before ( ( ) => {
20+ JSONSchemasInterface . registerGlobalSchema ( MOCK_GLOBAL_SCHEMA ) ;
2021 yamlFixture = fs . readFileSync ( YAML_COMBINE_FILE , "utf8" ) ;
2122 parsed = yaml . load ( yamlFixture , { schema : combineSchema } ) ;
2223 } ) ;
Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ import { expect } from "chai";
33import fs from "fs" ;
44import yaml from "js-yaml" ;
55
6+ import { JSONSchemasInterface } from "../../src/JSONSchemasInterface" ;
67import { esseType } from "../../src/utils/yaml" ;
78import { YAML_ESSE_FILE } from "../enums" ;
9+ import { MOCK_GLOBAL_SCHEMA } from "../fixtures/mock_esse_schema" ;
810
911const yamlSchema = yaml . DEFAULT_SCHEMA . extend ( [ esseType ] ) ;
1012
@@ -13,6 +15,7 @@ describe("YAML tag: !esse", () => {
1315 let parsed ;
1416
1517 before ( ( ) => {
18+ JSONSchemasInterface . registerGlobalSchema ( MOCK_GLOBAL_SCHEMA ) ;
1619 yamlFixture = fs . readFileSync ( YAML_ESSE_FILE , "utf8" ) ;
1720 parsed = yaml . load ( yamlFixture , { schema : yamlSchema } ) ;
1821 } ) ;
You can’t perform that action at this time.
0 commit comments