Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"packageManager": "yarn@3.6.1",
"scripts": {
"build": "yarn workspaces foreach -A run prepare",
"test": "yarn workspace @circuit-ui test:unit",
"test:visual": "yarn workspace @circuit-ui test:visual",
"test:unit": "yarn workspace @circuit-ui test:unit",
"test": "yarn workspace @circuit-ui/core test:unit",
"test:visual": "yarn workspace @circuit-ui/core test:visual",
"test:unit": "yarn workspace @circuit-ui/core test:unit",
"test:screenshots": "./scripts/capture-screenshots.sh",
"typecheck": "yarn workspaces foreach -A run typecheck",
"lint": "eslint \"packages/*/src/**/*.{js,ts,tsx}\"",
Expand Down
43 changes: 31 additions & 12 deletions packages/ui/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ jest.mock('react-native-svg', () => {
};
});

// ---------------------------------------------------------------------------
// Mock: react-native-worklets
// ---------------------------------------------------------------------------
// Keep PianoRoll tests on the JS thread in Jest. The real package ships ESM
// that Jest does not transform by default.
jest.mock('react-native-worklets', () => ({
__esModule: true,
scheduleOnRN: (fn) => fn,
}));

// ---------------------------------------------------------------------------
// Mock: react-native-reanimated
// ---------------------------------------------------------------------------
Expand Down Expand Up @@ -208,6 +218,23 @@ jest.mock('@shopify/react-native-skia', () => {
return Component;
};

const createPath = () => {
const path = {
moveTo: () => path,
lineTo: () => path,
close: () => path,
cubicTo: () => path,
quadTo: () => path,
arcTo: () => path,
addRect: () => path,
addOval: () => path,
addCircle: () => path,
addRRect: () => path,
detach: () => path,
};
return path;
};

return {
__esModule: true,
Canvas: createSkiaComponent('Canvas'),
Expand Down Expand Up @@ -240,18 +267,10 @@ jest.mock('@shopify/react-native-skia', () => {
useImage: () => null,
Skia: {
Path: {
Make: () => ({
moveTo: () => ({}),
lineTo: () => ({}),
close: () => ({}),
cubicTo: () => ({}),
quadTo: () => ({}),
arcTo: () => ({}),
addRect: () => ({}),
addOval: () => ({}),
addCircle: () => ({}),
addRRect: () => ({}),
}),
Make: createPath,
},
PathBuilder: {
Make: createPath,
},
Paint: () => ({}),
Matrix: () => [],
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
"react-native-gesture-handler": "^2.20.2",
"react-native-reanimated": "^3.17.4",
"react-native-svg": "^15.11.2",
"react-native-worklets": "0.8.3",
"react-test-renderer": "18.3.1",
"release-it": "^17.10.0",
"typescript": "^5.2.2"
Expand All @@ -270,8 +271,8 @@
"react-native": "*",
"react-native-gesture-handler": ">=2.0.0",
"react-native-reanimated": ">=3.0.0",
"react-native-worklets": ">=0.8.0",
"react-native-svg": ">=15.0.0"
"react-native-svg": ">=15.0.0",
"react-native-worklets": ">=0.8.0"
},
"react-native-builder-bob": {
"source": "src",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[`CreateAccountView matches snapshot 1`] = `
"borderRadius": 6,
"borderWidth": 1,
"flexDirection": "row",
"height": 36,
"height": 44,
"paddingHorizontal": 16,
},
{
Expand Down Expand Up @@ -137,7 +137,7 @@ exports[`CreateAccountView matches snapshot 1`] = `
"borderRadius": 6,
"borderWidth": 1,
"flexDirection": "row",
"height": 36,
"height": 44,
"paddingHorizontal": 16,
},
{
Expand Down Expand Up @@ -211,7 +211,7 @@ exports[`CreateAccountView matches snapshot 1`] = `
"borderRadius": 6,
"borderWidth": 1,
"flexDirection": "row",
"height": 36,
"height": 44,
"paddingHorizontal": 16,
},
{
Expand Down Expand Up @@ -292,6 +292,7 @@ exports[`CreateAccountView matches snapshot 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -411,7 +412,7 @@ exports[`SignInView matches snapshot 1`] = `
"borderRadius": 6,
"borderWidth": 1,
"flexDirection": "row",
"height": 36,
"height": 44,
"paddingHorizontal": 16,
},
{
Expand Down Expand Up @@ -485,7 +486,7 @@ exports[`SignInView matches snapshot 1`] = `
"borderRadius": 6,
"borderWidth": 1,
"flexDirection": "row",
"height": 36,
"height": 44,
"paddingHorizontal": 16,
},
{
Expand Down Expand Up @@ -566,6 +567,7 @@ exports[`SignInView matches snapshot 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -655,6 +657,7 @@ exports[`SignInView matches snapshot 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ exports[`EditProfileView matches snapshot (dark mode, visible) 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -758,6 +759,7 @@ exports[`EditProfileView matches snapshot (dark mode, visible) 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -857,6 +859,7 @@ exports[`EditProfileView matches snapshot (dark mode, visible) 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -1427,6 +1430,7 @@ exports[`EditProfileView matches snapshot (light mode, visible) 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -1675,6 +1679,7 @@ exports[`EditProfileView matches snapshot (light mode, visible) 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down Expand Up @@ -1774,6 +1779,7 @@ exports[`EditProfileView matches snapshot (light mode, visible) 1`] = `
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"minHeight": 44,
},
{
"paddingHorizontal": 16,
Expand Down
Loading
Loading