File tree 2 files changed +8
-8
lines changed
website/versioned_docs/version-22.x
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -146,12 +146,12 @@ function compileAndroidCode() {
146
146
}
147
147
148
148
test (' compiling android goes as expected' , () => {
149
- expect (compileAndroidCode).toThrow ();
150
- expect (compileAndroidCode).toThrow (Error );
149
+ expect (() => compileAndroidCode () ).toThrow ();
150
+ expect (() => compileAndroidCode () ).toThrow (Error );
151
151
152
152
// You can also use the exact error message or a regexp
153
- expect (compileAndroidCode).toThrow (' you are using the wrong JDK' );
154
- expect (compileAndroidCode).toThrow (/ JDK/ );
153
+ expect (() => compileAndroidCode () ).toThrow (' you are using the wrong JDK' );
154
+ expect (() => compileAndroidCode () ).toThrow (/ JDK/ );
155
155
});
156
156
```
157
157
Original file line number Diff line number Diff line change @@ -147,12 +147,12 @@ function compileAndroidCode() {
147
147
}
148
148
149
149
test (' compiling android goes as expected' , () => {
150
- expect (compileAndroidCode).toThrow ();
151
- expect (compileAndroidCode).toThrow (Error );
150
+ expect (() => compileAndroidCode () ).toThrow ();
151
+ expect (() => compileAndroidCode () ).toThrow (Error );
152
152
153
153
// You can also use the exact error message or a regexp
154
- expect (compileAndroidCode).toThrow (' you are using the wrong JDK' );
155
- expect (compileAndroidCode).toThrow (/ JDK/ );
154
+ expect (() => compileAndroidCode () ).toThrow (' you are using the wrong JDK' );
155
+ expect (() => compileAndroidCode () ).toThrow (/ JDK/ );
156
156
});
157
157
```
158
158
You can’t perform that action at this time.
0 commit comments