@cdx-ui/components 0.0.1-alpha.24 → 0.0.1-alpha.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +6 -5
package/README.md CHANGED
@@ -32,3 +32,20 @@ export function Example() {
32
32
  ```
33
33
 
34
34
  Component stories live in [`apps/storybook`](../../apps/storybook/).
35
+
36
+ ## Testing
37
+
38
+ Tests live in [`__tests__/`](./__tests__/). **Jest** loads the repo-root **`jest.config.js`**, which defines **dual** **`projects`** (**`rntl`** + **`axe`**). See **[docs/internal/testing.md](../../docs/internal/testing.md)**.
39
+
40
+ ```bash
41
+ # From monorepo root
42
+ pnpm nx run @cdx-ui/components:test
43
+ # or
44
+ pnpm test:all
45
+ ```
46
+
47
+ Production types use `tsconfig.json`; tests use `tsconfig.test.json`.
48
+
49
+ **Authoring:** See **[docs/internal/testing.md](../../docs/internal/testing.md)** (file naming, RNTL vs DOM suites, `fireEvent.press` vs `fireEvent.click`).
50
+
51
+ **Ad-hoc Jest** (from `packages/components`): `pnpm exec jest --config ../../jest.config.js` — with dual **`projects`**, add **`--selectProjects axe`** or **`rntl`**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/components",
3
- "version": "0.0.1-alpha.24",
3
+ "version": "0.0.1-alpha.26",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -65,9 +65,9 @@
65
65
  "@gorhom/bottom-sheet": "^5.2.6",
66
66
  "class-variance-authority": "^0.7.1",
67
67
  "uniwind": "1.4.1",
68
- "@cdx-ui/primitives": "0.0.1-alpha.24",
69
- "@cdx-ui/utils": "0.0.1-alpha.24",
70
- "@cdx-ui/icons": "0.0.1-alpha.24"
68
+ "@cdx-ui/primitives": "0.0.1-alpha.26",
69
+ "@cdx-ui/utils": "0.0.1-alpha.26",
70
+ "@cdx-ui/icons": "0.0.1-alpha.26"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/react": "*",
@@ -93,6 +93,7 @@
93
93
  },
94
94
  "scripts": {
95
95
  "build": "bob build",
96
- "lint": "eslint src/"
96
+ "lint": "eslint src/",
97
+ "test": "jest --config ../../jest.config.js"
97
98
  }
98
99
  }