File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ const schema = {
12
12
} ,
13
13
} ,
14
14
} ;
15
+ const validate = ajv . compile ( schema ) ;
15
16
16
17
it ( "should give error if value isn't function" , ( ) => {
17
18
expect . assertions ( 2 ) ;
18
- const validate = ajv . compile ( schema ) ;
19
19
const result = validate ( {
20
20
foo : "spam" ,
21
21
} ) ;
@@ -35,7 +35,6 @@ it("should give error if value isn't function", () => {
35
35
36
36
it ( "should not give error if value is function" , ( ) => {
37
37
expect . assertions ( 2 ) ;
38
- const validate = ajv . compile ( schema ) ;
39
38
function foo ( ) : void {
40
39
/* do nothing */
41
40
}
@@ -48,7 +47,6 @@ it("should not give error if value is function", () => {
48
47
49
48
it ( "should not give error if value is arrow function" , ( ) => {
50
49
expect . assertions ( 2 ) ;
51
- const validate = ajv . compile ( schema ) ;
52
50
const result = validate ( {
53
51
foo : ( ) : void => {
54
52
/* do nothing */
@@ -60,7 +58,6 @@ it("should not give error if value is arrow function", () => {
60
58
61
59
it ( "should not give error if value is method" , ( ) => {
62
60
expect . assertions ( 2 ) ;
63
- const validate = ajv . compile ( schema ) ;
64
61
const result = validate ( {
65
62
foo ( ) : void {
66
63
/* do nothing */
You can’t perform that action at this time.
0 commit comments