Skip to content

Commit

Permalink
Fix lint / format
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronlademann-wf committed Mar 1, 2024
1 parent bce5661 commit a7a77f5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
3 changes: 2 additions & 1 deletion example/test/react_test_components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class _ClockComponent extends react.Component {

@override
render() {
return react.span({'onClick': (event) => print('Hello World!')},
return react.span(
{'onClick': (event) => print('Hello World!')},
// { 'onClick': (event, [domid = null]) => print("Hello World!") },
['Seconds elapsed: ', "${state['secondsElapsed']}"]);
}
Expand Down
1 change: 0 additions & 1 deletion lib/react.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export 'package:react/src/react_client/event_helpers.dart';
export 'package:react/react_client/react_interop.dart' show forwardRef2, createRef, memo2;
export 'package:react/src/react_client/synthetic_event_wrappers.dart' hide NonNativeDataTransfer;
export 'package:react/src/react_client/synthetic_data_transfer.dart' show SyntheticDataTransfer;
export 'package:react/src/react_client/event_helpers.dart';

/// A React component declared using a function that takes in [props] and returns rendered output.
///
Expand Down
51 changes: 50 additions & 1 deletion test/mockito.mocks.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Mocks generated by Mockito 5.4.0 from annotations
// Mocks generated by Mockito 5.4.2 from annotations
// in react/test/mockito.dart.
// Do not manually edit this file.

Expand Down Expand Up @@ -61,42 +61,49 @@ class MockKeyboardEvent extends _i1.Mock implements _i2.KeyboardEvent {
returnValue: 0,
returnValueForMissingStub: 0,
) as int);

@override
int get charCode => (super.noSuchMethod(
Invocation.getter(#charCode),
returnValue: 0,
returnValueForMissingStub: 0,
) as int);

@override
bool get altKey => (super.noSuchMethod(
Invocation.getter(#altKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
bool get ctrlKey => (super.noSuchMethod(
Invocation.getter(#ctrlKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
int get location => (super.noSuchMethod(
Invocation.getter(#location),
returnValue: 0,
returnValueForMissingStub: 0,
) as int);

@override
bool get metaKey => (super.noSuchMethod(
Invocation.getter(#metaKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
bool get shiftKey => (super.noSuchMethod(
Invocation.getter(#shiftKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
_i2.Element get matchingTarget => (super.noSuchMethod(
Invocation.getter(#matchingTarget),
Expand All @@ -109,30 +116,35 @@ class MockKeyboardEvent extends _i1.Mock implements _i2.KeyboardEvent {
Invocation.getter(#matchingTarget),
),
) as _i2.Element);

@override
List<_i2.EventTarget> get path => (super.noSuchMethod(
Invocation.getter(#path),
returnValue: <_i2.EventTarget>[],
returnValueForMissingStub: <_i2.EventTarget>[],
) as List<_i2.EventTarget>);

@override
bool get defaultPrevented => (super.noSuchMethod(
Invocation.getter(#defaultPrevented),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
int get eventPhase => (super.noSuchMethod(
Invocation.getter(#eventPhase),
returnValue: 0,
returnValueForMissingStub: 0,
) as int);

@override
String get type => (super.noSuchMethod(
Invocation.getter(#type),
returnValue: '',
returnValueForMissingStub: '',
) as String);

@override
bool getModifierState(String? keyArg) => (super.noSuchMethod(
Invocation.method(
Expand All @@ -142,6 +154,7 @@ class MockKeyboardEvent extends _i1.Mock implements _i2.KeyboardEvent {
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
List<_i2.EventTarget> composedPath() => (super.noSuchMethod(
Invocation.method(
Expand All @@ -151,6 +164,7 @@ class MockKeyboardEvent extends _i1.Mock implements _i2.KeyboardEvent {
returnValue: <_i2.EventTarget>[],
returnValueForMissingStub: <_i2.EventTarget>[],
) as List<_i2.EventTarget>);

@override
void preventDefault() => super.noSuchMethod(
Invocation.method(
Expand All @@ -159,6 +173,7 @@ class MockKeyboardEvent extends _i1.Mock implements _i2.KeyboardEvent {
),
returnValueForMissingStub: null,
);

@override
void stopImmediatePropagation() => super.noSuchMethod(
Invocation.method(
Expand All @@ -167,6 +182,7 @@ class MockKeyboardEvent extends _i1.Mock implements _i2.KeyboardEvent {
),
returnValueForMissingStub: null,
);

@override
void stopPropagation() => super.noSuchMethod(
Invocation.method(
Expand All @@ -189,6 +205,7 @@ class MockDataTransfer extends _i1.Mock implements _i2.DataTransfer {
),
returnValueForMissingStub: null,
);

@override
set effectAllowed(String? value) => super.noSuchMethod(
Invocation.setter(
Expand All @@ -197,6 +214,7 @@ class MockDataTransfer extends _i1.Mock implements _i2.DataTransfer {
),
returnValueForMissingStub: null,
);

@override
void clearData([String? format]) => super.noSuchMethod(
Invocation.method(
Expand All @@ -205,6 +223,7 @@ class MockDataTransfer extends _i1.Mock implements _i2.DataTransfer {
),
returnValueForMissingStub: null,
);

@override
String getData(String? format) => (super.noSuchMethod(
Invocation.method(
Expand All @@ -214,6 +233,7 @@ class MockDataTransfer extends _i1.Mock implements _i2.DataTransfer {
returnValue: '',
returnValueForMissingStub: '',
) as String);

@override
void setData(
String? format,
Expand All @@ -229,6 +249,7 @@ class MockDataTransfer extends _i1.Mock implements _i2.DataTransfer {
),
returnValueForMissingStub: null,
);

@override
void setDragImage(
_i2.Element? image,
Expand Down Expand Up @@ -258,30 +279,35 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
int get button => (super.noSuchMethod(
Invocation.getter(#button),
returnValue: 0,
returnValueForMissingStub: 0,
) as int);

@override
bool get ctrlKey => (super.noSuchMethod(
Invocation.getter(#ctrlKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
bool get metaKey => (super.noSuchMethod(
Invocation.getter(#metaKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
bool get shiftKey => (super.noSuchMethod(
Invocation.getter(#shiftKey),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
_i3.Point<num> get client => (super.noSuchMethod(
Invocation.getter(#client),
Expand All @@ -294,6 +320,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#client),
),
) as _i3.Point<num>);

@override
_i3.Point<num> get movement => (super.noSuchMethod(
Invocation.getter(#movement),
Expand All @@ -306,6 +333,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#movement),
),
) as _i3.Point<num>);

@override
_i3.Point<num> get offset => (super.noSuchMethod(
Invocation.getter(#offset),
Expand All @@ -318,6 +346,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#offset),
),
) as _i3.Point<num>);

@override
_i3.Point<num> get screen => (super.noSuchMethod(
Invocation.getter(#screen),
Expand All @@ -330,6 +359,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#screen),
),
) as _i3.Point<num>);

@override
_i3.Point<num> get layer => (super.noSuchMethod(
Invocation.getter(#layer),
Expand All @@ -342,6 +372,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#layer),
),
) as _i3.Point<num>);

@override
_i3.Point<num> get page => (super.noSuchMethod(
Invocation.getter(#page),
Expand All @@ -354,6 +385,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#page),
),
) as _i3.Point<num>);

@override
_i2.DataTransfer get dataTransfer => (super.noSuchMethod(
Invocation.getter(#dataTransfer),
Expand All @@ -366,6 +398,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#dataTransfer),
),
) as _i2.DataTransfer);

@override
_i2.Element get matchingTarget => (super.noSuchMethod(
Invocation.getter(#matchingTarget),
Expand All @@ -378,30 +411,35 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
Invocation.getter(#matchingTarget),
),
) as _i2.Element);

@override
List<_i2.EventTarget> get path => (super.noSuchMethod(
Invocation.getter(#path),
returnValue: <_i2.EventTarget>[],
returnValueForMissingStub: <_i2.EventTarget>[],
) as List<_i2.EventTarget>);

@override
bool get defaultPrevented => (super.noSuchMethod(
Invocation.getter(#defaultPrevented),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
int get eventPhase => (super.noSuchMethod(
Invocation.getter(#eventPhase),
returnValue: 0,
returnValueForMissingStub: 0,
) as int);

@override
String get type => (super.noSuchMethod(
Invocation.getter(#type),
returnValue: '',
returnValueForMissingStub: '',
) as String);

@override
bool getModifierState(String? keyArg) => (super.noSuchMethod(
Invocation.method(
Expand All @@ -411,6 +449,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
List<_i2.EventTarget> composedPath() => (super.noSuchMethod(
Invocation.method(
Expand All @@ -420,6 +459,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
returnValue: <_i2.EventTarget>[],
returnValueForMissingStub: <_i2.EventTarget>[],
) as List<_i2.EventTarget>);

@override
void preventDefault() => super.noSuchMethod(
Invocation.method(
Expand All @@ -428,6 +468,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
),
returnValueForMissingStub: null,
);

@override
void stopImmediatePropagation() => super.noSuchMethod(
Invocation.method(
Expand All @@ -436,6 +477,7 @@ class MockMouseEvent extends _i1.Mock implements _i2.MouseEvent {
),
returnValueForMissingStub: null,
);

@override
void stopPropagation() => super.noSuchMethod(
Invocation.method(
Expand All @@ -456,42 +498,49 @@ class MockSyntheticEvent extends _i1.Mock implements _i4.SyntheticEvent {
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
bool get cancelable => (super.noSuchMethod(
Invocation.getter(#cancelable),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
bool get defaultPrevented => (super.noSuchMethod(
Invocation.getter(#defaultPrevented),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
num get eventPhase => (super.noSuchMethod(
Invocation.getter(#eventPhase),
returnValue: 0,
returnValueForMissingStub: 0,
) as num);

@override
bool get isTrusted => (super.noSuchMethod(
Invocation.getter(#isTrusted),
returnValue: false,
returnValueForMissingStub: false,
) as bool);

@override
num get timeStamp => (super.noSuchMethod(
Invocation.getter(#timeStamp),
returnValue: 0,
returnValueForMissingStub: 0,
) as num);

@override
String get type => (super.noSuchMethod(
Invocation.getter(#type),
returnValue: '',
returnValueForMissingStub: '',
) as String);

@override
void preventDefault() => super.noSuchMethod(
Invocation.method(
Expand Down

0 comments on commit a7a77f5

Please sign in to comment.