File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import 'package:react/react_client.dart' show Ref;
1919import 'package:react_testing_library/react_testing_library.dart' as rtl;
2020import 'package:test/test.dart' ;
2121
22+ import '../react_version_test.dart' ;
23+
2224void main () {
2325 group ('prettyDOM' , () {
2426 group ('returns a formatted string of the HTML produced by the node provided' , () {
@@ -32,7 +34,8 @@ void main() {
3234 {},
3335 react.p ({}, 'you again?' ),
3436 ),
35- react.script ({}),
37+ // Only test filterNode on React 18.
38+ reactVersion.startsWith ('18.' ) ? react.script ({}) : null ,
3639 );
3740 rtl.render (vDom);
3841 });
@@ -59,7 +62,7 @@ void main() {
5962
6063 test ('when filterNode is set' , () {
6164 expect (rtl.prettyDOM (vDomRootRef.current, filterNode: (_) => true ), _expectedPrettyDomWithFilterNode);
62- });
65+ }, tags : 'react-18' );
6366
6467 test ('with null input' , () {
6568 expect (rtl.prettyDOM (null ), _expectedPrettyDomNull);
You can’t perform that action at this time.
0 commit comments