File tree 2 files changed +7
-3
lines changed
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";
5
5
import yaml from "js-yaml" ;
6
6
import lodash from "lodash" ;
7
7
8
+ import { JSONSchemasInterface } from "../../src/JSONSchemasInterface" ;
8
9
import { combineType , esseType } from "../../src/utils/yaml" ;
9
10
import { YAML_COMBINE_FILE } from "../enums" ;
11
+ import { MOCK_GLOBAL_SCHEMA } from "../fixtures/mock_esse_schema" ;
10
12
11
13
const combineSchema = yaml . DEFAULT_SCHEMA . extend ( [ combineType , esseType ] ) ;
12
14
13
15
describe ( "YAML tag: !combine" , ( ) => {
14
16
let yamlFixture ;
15
17
let parsed ;
16
18
17
- // eslint-disable-next-line func-names
18
- before ( function ( ) {
19
- this . timeout ( 5000 ) ;
19
+ before ( ( ) => {
20
+ JSONSchemasInterface . registerGlobalSchema ( MOCK_GLOBAL_SCHEMA ) ;
20
21
yamlFixture = fs . readFileSync ( YAML_COMBINE_FILE , "utf8" ) ;
21
22
parsed = yaml . load ( yamlFixture , { schema : combineSchema } ) ;
22
23
} ) ;
Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ import { expect } from "chai";
3
3
import fs from "fs" ;
4
4
import yaml from "js-yaml" ;
5
5
6
+ import { JSONSchemasInterface } from "../../src/JSONSchemasInterface" ;
6
7
import { esseType } from "../../src/utils/yaml" ;
7
8
import { YAML_ESSE_FILE } from "../enums" ;
9
+ import { MOCK_GLOBAL_SCHEMA } from "../fixtures/mock_esse_schema" ;
8
10
9
11
const yamlSchema = yaml . DEFAULT_SCHEMA . extend ( [ esseType ] ) ;
10
12
@@ -13,6 +15,7 @@ describe("YAML tag: !esse", () => {
13
15
let parsed ;
14
16
15
17
before ( ( ) => {
18
+ JSONSchemasInterface . registerGlobalSchema ( MOCK_GLOBAL_SCHEMA ) ;
16
19
yamlFixture = fs . readFileSync ( YAML_ESSE_FILE , "utf8" ) ;
17
20
parsed = yaml . load ( yamlFixture , { schema : yamlSchema } ) ;
18
21
} ) ;
You can’t perform that action at this time.
0 commit comments