@@ -6,8 +6,6 @@ const dialect = require("../../schemas/v3.1/dialect/base.schema.json");
6
6
const vocabulary = require ( "../../schemas/v3.1/meta/base.schema.json" ) ;
7
7
8
8
9
- const testSuitePath = `${ __dirname } /../openapi3-examples/3.1` ;
10
-
11
9
JsonSchema . setMetaOutputFormat ( JsonSchema . BASIC ) ;
12
10
//JsonSchema.setShouldMetaValidate(false);
13
11
@@ -20,10 +18,10 @@ before(async () => {
20
18
} ) ;
21
19
22
20
describe ( "Pass" , ( ) => {
23
- fs . readdirSync ( `${ testSuitePath } /pass` , { withFileTypes : true } )
21
+ fs . readdirSync ( `${ __dirname } /pass` , { withFileTypes : true } )
24
22
. filter ( ( entry ) => entry . isFile ( ) && / \. y a m l $ / . test ( entry . name ) )
25
23
. forEach ( ( entry ) => {
26
- const file = `${ testSuitePath } /pass/${ entry . name } ` ;
24
+ const file = `${ __dirname } /pass/${ entry . name } ` ;
27
25
28
26
it ( entry . name , async ( ) => {
29
27
const instance = yaml . parse ( fs . readFileSync ( file , "utf8" ) ) ;
@@ -35,10 +33,10 @@ describe("Pass", () => {
35
33
} ) ;
36
34
37
35
describe ( "Fail" , ( ) => {
38
- fs . readdirSync ( `${ testSuitePath } /fail` , { withFileTypes : true } )
36
+ fs . readdirSync ( `${ __dirname } /fail` , { withFileTypes : true } )
39
37
. filter ( ( entry ) => entry . isFile ( ) && / \. y a m l $ / . test ( entry . name ) )
40
38
. forEach ( ( entry ) => {
41
- const file = `${ testSuitePath } /fail/${ entry . name } ` ;
39
+ const file = `${ __dirname } /fail/${ entry . name } ` ;
42
40
43
41
it ( entry . name , async ( ) => {
44
42
const instance = yaml . parse ( fs . readFileSync ( file , "utf8" ) ) ;
0 commit comments