@@ -24,14 +24,6 @@ testing.describe(`Variable`, () => {
24
24
25
25
expect ( variableFix . value ) . toBeUndefined ( ) ;
26
26
toBe . undefined ( variableFix . value ) ;
27
- } )
28
-
29
- . it ( `Variable.prototype.variable` , ( ) => {
30
- expect ( variableProblem . variable ) . toEqual ( `{${ problem } }` ) ;
31
- toBe . stringIncludes ( variableProblem . variable , [ `{${ problem } }` , problem ] ) ;
32
-
33
- expect ( variableFix . variable ) . toEqual ( `{${ fix } }` ) ;
34
- toBe . stringIncludes ( variableFix . variable , [ fix , `{${ fix } }` ] ) ;
35
27
} ) ;
36
28
37
29
} )
@@ -40,10 +32,10 @@ testing.describe(`Variable`, () => {
40
32
testing
41
33
42
34
. it ( `Variable.define()` , ( ) => {
43
- expect ( Variable . define ( problem , value ) . variable ) . toEqual ( `{${ problem } }` ) ;
35
+ expect ( Variable . define ( problem , value ) . valueOf ( ) ) . toEqual ( `{${ problem } }` ) ;
44
36
expect ( Variable . define ( problem , value ) . value ) . toEqual ( value ) ;
45
37
46
- expect ( Variable . define ( fix ) . variable ) . toEqual ( `{${ fix } }` ) ;
38
+ expect ( Variable . define ( fix ) . valueOf ( ) ) . toEqual ( `{${ fix } }` ) ;
47
39
expect ( Variable . define ( fix ) . getValue ( ) ) . toBeUndefined ( ) ;
48
40
expect ( Variable . define ( fix ) . value ) . toBeUndefined ( ) ;
49
41
} )
@@ -71,16 +63,16 @@ testing.describe(`Variable`, () => {
71
63
} )
72
64
73
65
. it ( `Variable.prototype.replaceVariable()` , ( ) => {
74
- expect ( variableProblem . replaceVariable ( text ) )
66
+ expect ( variableProblem . replaceVariableIn ( text ) )
75
67
. toEqual ( '{id} There is a problem with my {fix} and we cannot repair it.' ) ;
76
- expect ( variableProblem . replaceVariable ( text , 'Custom text' as any ) )
68
+ expect ( variableProblem . replaceVariableIn ( text , 'Custom text' as any ) )
77
69
. toEqual ( '{id} Custom text with my {fix} and we cannot repair it.' ) ;
78
- expect ( new Variable ( 'problem' ) . replaceVariable ( text , 'There is not a problem' ) )
70
+ expect ( new Variable ( 'problem' ) . replaceVariableIn ( text , 'There is not a problem' ) )
79
71
. toEqual ( '{id} There is not a problem with my {fix} and we cannot repair it.' ) ;
80
72
81
- expect ( variableFix . replaceVariable ( text ) )
73
+ expect ( variableFix . replaceVariableIn ( text ) )
82
74
. toEqual ( '{id} {problem} with my and we cannot repair it.' ) ;
83
- expect ( variableFix . replaceVariable ( text , 'fix ooouuch' ) )
75
+ expect ( variableFix . replaceVariableIn ( text , 'fix ooouuch' ) )
84
76
. toEqual ( '{id} {problem} with my fix ooouuch and we cannot repair it.' ) ;
85
77
} )
86
78
@@ -95,11 +87,11 @@ testing.describe(`Variable`, () => {
95
87
} )
96
88
97
89
. it ( `Variable.prototype.toString()` , ( ) => {
98
- expect ( variableProblem . variable ) . toEqual ( `{${ problem } }` ) ;
99
- toBe . stringIncludes ( variableProblem . variable , [ `{${ problem } }` , problem ] ) ;
90
+ expect ( variableProblem . toString ( ) ) . toEqual ( `{${ problem } }` ) ;
91
+ toBe . stringIncludes ( variableProblem . toString ( ) , [ `{${ problem } }` , problem ] ) ;
100
92
101
- expect ( variableFix . variable ) . toEqual ( `{${ fix } }` ) ;
102
- toBe . stringIncludes ( variableFix . variable , [ `{${ fix } }` , fix ] ) ;
93
+ expect ( variableFix . toString ( ) ) . toEqual ( `{${ fix } }` ) ;
94
+ toBe . stringIncludes ( variableFix . toString ( ) , [ `{${ fix } }` , fix ] ) ;
103
95
} )
104
96
105
97
. it ( `Variable.prototype.valueOf()` , ( ) => {
0 commit comments