-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
122 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
"compile": "tsc", | ||
"lint": "eslint . --report-unused-disable-directives", | ||
"release": "semantic-release", | ||
"test": "NODE_ENV=test mocha" | ||
"test": "RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS=true NODE_ENV=test mocha" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Animated } from "react-native"; | ||
|
||
import { AnimatedValueMock } from "./AnimatedValueMock"; | ||
import { AnimatedValueXYMock } from "./AnimatedValueXY"; | ||
|
||
export const AnimatedMock: typeof Animated = { | ||
...Animated, | ||
Value: AnimatedValueMock, | ||
ValueXY: AnimatedValueXYMock, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Animated } from "react-native"; | ||
|
||
export class AnimatedValueMock extends Animated.Value { | ||
|
||
public constructor( | ||
value: number, | ||
config: Animated.AnimatedConfig = { useNativeDriver: false }, | ||
) { | ||
super(value, { ...config, useNativeDriver: false }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Animated } from "react-native"; | ||
|
||
interface ValueXY { | ||
x: number | Animated.AnimatedValue; | ||
y: number | Animated.AnimatedValue; | ||
} | ||
|
||
export class AnimatedValueXYMock extends Animated.ValueXY { | ||
|
||
public constructor ( | ||
value: ValueXY, | ||
config: Animated.AnimatedConfig = { useNativeDriver: false }, | ||
) { | ||
super(value, { ...config, useNativeDriver: false }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters