@@ -786,7 +786,7 @@ describe('Auto Completion Tests', () => {
786
786
} ) ;
787
787
788
788
it ( 'Insert required attributes at correct level' , ( done ) => {
789
- const schema = require ( path . join ( __dirname , './fixtures/testRequiredProperties.json' ) ) ;
789
+ const schema = require ( './fixtures/testRequiredProperties.json' ) ;
790
790
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
791
791
const content = '- top:\n prop1: demo\n- ' ;
792
792
const completion = parseSetup ( content , content . length ) ;
@@ -804,7 +804,7 @@ describe('Auto Completion Tests', () => {
804
804
} ) ;
805
805
806
806
it ( 'Insert required attributes at correct level even on first element' , ( done ) => {
807
- const schema = require ( path . join ( __dirname , './fixtures/testRequiredProperties.json' ) ) ;
807
+ const schema = require ( './fixtures/testRequiredProperties.json' ) ;
808
808
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
809
809
const content = '- ' ;
810
810
const completion = parseSetup ( content , content . length ) ;
@@ -822,7 +822,7 @@ describe('Auto Completion Tests', () => {
822
822
} ) ;
823
823
824
824
it ( 'Provide the 3 types when none provided' , ( done ) => {
825
- const schema = require ( path . join ( __dirname , './fixtures/testArrayMaxProperties.json' ) ) ;
825
+ const schema = require ( './fixtures/testArrayMaxProperties.json' ) ;
826
826
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
827
827
const content = '- ' ;
828
828
const completion = parseSetup ( content , content . length ) ;
@@ -852,7 +852,7 @@ describe('Auto Completion Tests', () => {
852
852
} ) ;
853
853
854
854
it ( 'Provide the 2 types when one is provided' , ( done ) => {
855
- const schema = require ( path . join ( __dirname , './fixtures/testArrayMaxProperties.json' ) ) ;
855
+ const schema = require ( './fixtures/testArrayMaxProperties.json' ) ;
856
856
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
857
857
const content = '- prop1:\n ' ;
858
858
const completion = parseSetup ( content , content . length ) ;
@@ -876,7 +876,7 @@ describe('Auto Completion Tests', () => {
876
876
} ) ;
877
877
878
878
it ( 'Provide the 2 types when one is provided and the second is typed' , ( done ) => {
879
- const schema = require ( path . join ( __dirname , './fixtures/testArrayMaxProperties.json' ) ) ;
879
+ const schema = require ( './fixtures/testArrayMaxProperties.json' ) ;
880
880
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
881
881
const content = '- prop1:\n p' ;
882
882
const completion = parseSetup ( content , content . length ) ;
@@ -900,7 +900,7 @@ describe('Auto Completion Tests', () => {
900
900
} ) ;
901
901
902
902
it ( 'Provide no completion when maxProperties reached' , ( done ) => {
903
- const schema = require ( path . join ( __dirname , './fixtures/testArrayMaxProperties.json' ) ) ;
903
+ const schema = require ( './fixtures/testArrayMaxProperties.json' ) ;
904
904
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
905
905
const content = '- prop1:\n prop2:\n ' ;
906
906
const completion = parseSetup ( content , content . length ) ;
@@ -1041,7 +1041,7 @@ describe('Auto Completion Tests', () => {
1041
1041
1042
1042
describe ( 'Array Specific Tests' , function ( ) {
1043
1043
it ( 'Should insert empty array item' , ( done ) => {
1044
- const schema = require ( path . join ( __dirname , './fixtures/testStringArray.json' ) ) ;
1044
+ const schema = require ( './fixtures/testStringArray.json' ) ;
1045
1045
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
1046
1046
const content = 'fooBa' ; // len: 5
1047
1047
const completion = parseSetup ( content , content . lastIndexOf ( 'Ba' ) + 2 ) ; // pos: 3+2
@@ -1842,7 +1842,7 @@ describe('Auto Completion Tests', () => {
1842
1842
1843
1843
describe ( 'Indentation Specific Tests' , function ( ) {
1844
1844
it ( 'Indent should be considered with position relative to slash' , ( done ) => {
1845
- const schema = require ( path . join ( __dirname , './fixtures/testArrayIndent.json' ) ) ;
1845
+ const schema = require ( './fixtures/testArrayIndent.json' ) ;
1846
1846
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
1847
1847
const content = 'install:\n - he' ; // len: 15
1848
1848
const completion = parseSetup ( content , content . lastIndexOf ( 'he' ) + 2 ) ; // pos: 13+2
@@ -1860,7 +1860,7 @@ describe('Auto Completion Tests', () => {
1860
1860
} ) ;
1861
1861
1862
1862
it ( 'Large indent should be considered with position relative to slash' , ( done ) => {
1863
- const schema = require ( path . join ( __dirname , './fixtures/testArrayIndent.json' ) ) ;
1863
+ const schema = require ( './fixtures/testArrayIndent.json' ) ;
1864
1864
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
1865
1865
const content = 'install:\n - he' ; // len: 25
1866
1866
const completion = parseSetup ( content , content . lastIndexOf ( 'he' ) + 2 ) ; // pos: 23+2
@@ -1878,7 +1878,7 @@ describe('Auto Completion Tests', () => {
1878
1878
} ) ;
1879
1879
1880
1880
it ( 'Tab indent should be considered with position relative to slash' , ( done ) => {
1881
- const schema = require ( path . join ( __dirname , './fixtures/testArrayIndent.json' ) ) ;
1881
+ const schema = require ( './fixtures/testArrayIndent.json' ) ;
1882
1882
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
1883
1883
const content = 'install:\n -\t he' ; // len: 27
1884
1884
const completion = parseSetup ( content , content . lastIndexOf ( 'he' ) + 2 ) ; // pos: 25+2
@@ -2601,7 +2601,7 @@ describe('Auto Completion Tests', () => {
2601
2601
2602
2602
describe ( 'Array completion' , ( ) => {
2603
2603
it ( 'Simple array object completion with "-" without any item' , ( done ) => {
2604
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2604
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2605
2605
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2606
2606
const content = 'test_simpleArrayObject:\n -' ;
2607
2607
const completion = parseSetup ( content , content . length ) ;
@@ -2615,7 +2615,7 @@ describe('Auto Completion Tests', () => {
2615
2615
} ) ;
2616
2616
2617
2617
it ( 'Simple array object completion without "-" after array item' , ( done ) => {
2618
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2618
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2619
2619
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2620
2620
const content = 'test_simpleArrayObject:\n - obj1:\n name: 1\n ' ;
2621
2621
const completion = parseSetup ( content , content . length ) ;
@@ -2628,7 +2628,7 @@ describe('Auto Completion Tests', () => {
2628
2628
} ) ;
2629
2629
2630
2630
it ( 'Simple array object completion with "-" after array item' , ( done ) => {
2631
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2631
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2632
2632
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2633
2633
const content = 'test_simpleArrayObject:\n - obj1:\n name: 1\n -' ;
2634
2634
const completion = parseSetup ( content , content . length ) ;
@@ -2642,7 +2642,7 @@ describe('Auto Completion Tests', () => {
2642
2642
} ) ;
2643
2643
2644
2644
it ( 'Array anyOf two objects completion with "- " without any item' , ( done ) => {
2645
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2645
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2646
2646
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2647
2647
const content = 'test_array_anyOf_2objects:\n - ' ;
2648
2648
const completion = parseSetup ( content , content . length ) ;
@@ -2658,7 +2658,7 @@ describe('Auto Completion Tests', () => {
2658
2658
} ) ;
2659
2659
2660
2660
it ( 'Array anyOf two objects completion with "-" without any item' , ( done ) => {
2661
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2661
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2662
2662
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2663
2663
const content = 'test_array_anyOf_2objects:\n -' ;
2664
2664
const completion = parseSetup ( content , content . length ) ;
@@ -2672,7 +2672,7 @@ describe('Auto Completion Tests', () => {
2672
2672
} ) ;
2673
2673
2674
2674
it ( 'Simple array object completion without "-" befor array empty item' , ( done ) => {
2675
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2675
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2676
2676
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2677
2677
const content = 'test_simpleArrayObject:\n |\n| -' ; // len: 30, pos: 26
2678
2678
const completion = parseSetup ( content ) ;
@@ -2685,7 +2685,7 @@ describe('Auto Completion Tests', () => {
2685
2685
} ) ;
2686
2686
2687
2687
it ( 'Array anyOf two objects completion without "-" after array item' , ( done ) => {
2688
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2688
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2689
2689
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2690
2690
const content = 'test_array_anyOf_2objects:\n - obj1:\n name: 1\n ' ;
2691
2691
const completion = parseSetup ( content , content . length ) ;
@@ -2697,7 +2697,7 @@ describe('Auto Completion Tests', () => {
2697
2697
} ) ;
2698
2698
2699
2699
it ( 'Array nested anyOf without "-" should return all array items' , ( done ) => {
2700
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2700
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2701
2701
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2702
2702
const content = 'test_array_nested_anyOf:\n - obj1:\n name:1\n ' ;
2703
2703
const completion = parseSetup ( content , content . length ) ;
@@ -2709,7 +2709,7 @@ describe('Auto Completion Tests', () => {
2709
2709
} ) ;
2710
2710
2711
2711
it ( 'Array anyOf two objects completion with "-" after array item' , ( done ) => {
2712
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2712
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2713
2713
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2714
2714
const content = 'test_array_anyOf_2objects:\n - obj1:\n name: 1\n -' ;
2715
2715
const completion = parseSetup ( content , content . length ) ;
@@ -2723,7 +2723,7 @@ describe('Auto Completion Tests', () => {
2723
2723
} ) ;
2724
2724
2725
2725
it ( 'Array anyOf two objects completion indentation' , async ( ) => {
2726
- const schema = require ( path . join ( __dirname , './fixtures/testArrayCompletionSchema.json' ) ) ;
2726
+ const schema = require ( './fixtures/testArrayCompletionSchema.json' ) ;
2727
2727
schemaProvider . addSchema ( SCHEMA_ID , schema ) ;
2728
2728
const content = 'test_array_anyOf_2objects:\n - obj' ;
2729
2729
const completion = await parseSetup ( content , content . length ) ;
0 commit comments