You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains end-to-end tests for the [console-table-printer](https://github.com/ayonious/console-table-printer) and [simple-wcswidth](https://github.com/ayonious/simple-wcswidth) packages.
@@ -13,6 +13,12 @@ This repository contains end-to-end tests for the [console-table-printer](https:
13
13
-**simple-wcswidth**: Tests for character width calculation with various character sets
14
14
-**Integration**: Tests that combine both libraries to ensure they work well together
15
15
16
+
### TypeScript Tests
17
+
18
+
-**TypeScript Import Tests**: Verify that both packages can be properly imported in TypeScript
19
+
-**Type Checking**: Ensure that exported types are correctly defined and usable
20
+
-**TypeScript Integration**: Test both libraries working together in a TypeScript environment
21
+
16
22
### Website Tests (Playwright)
17
23
18
24
- Tests for the [console-table-printer website](https://console-table.netlify.app/)
@@ -24,8 +30,8 @@ This repository contains end-to-end tests for the [console-table-printer](https:
24
30
# Install dependencies
25
31
yarn
26
32
27
-
# Run unit tests
28
-
yarn test:unit
33
+
# Run JavaScript and TypeScript unit tests
34
+
yarn test
29
35
30
36
# Run website E2E tests
31
37
yarn test:e2e
@@ -38,14 +44,23 @@ yarn test:all
38
44
39
45
```
40
46
tests/
41
-
├── console-table-printer/ # Unit tests for console-table-printer
47
+
├── console-table-printer/ # JavaScript unit tests for console-table-printer
42
48
│ ├── basic.test.js
43
49
│ └── advanced.test.js
44
-
├── simple-wcswidth/ # Unit tests for simple-wcswidth
50
+
├── simple-wcswidth/ # JavaScript unit tests for simple-wcswidth
45
51
│ ├── basic.test.js
46
52
│ └── advanced.test.js
47
-
├── integration/ # Integration tests combining both libraries
53
+
├── integration/ # JavaScript integration tests
48
54
│ └── combined.test.js
55
+
├── typescript/ # TypeScript tests
56
+
│ ├── console-table-printer/
57
+
│ │ ├── basic.test.ts
58
+
│ │ └── advanced.test.ts
59
+
│ ├── simple-wcswidth/
60
+
│ │ ├── basic.test.ts
61
+
│ │ └── advanced.test.ts
62
+
│ └── integration/
63
+
│ └── combined.test.ts
49
64
└── website/ # Website E2E tests with Playwright
50
65
├── homepage.test.js
51
66
└── docs.test.js
@@ -55,12 +70,14 @@ tests/
55
70
56
71
This repository uses GitHub Actions to run tests automatically:
57
72
58
-
- Tests run hourly to ensure continuous compatibility
73
+
- Tests run daily at midnight UTC to ensure continuous compatibility
59
74
- Tests run on every push to the main branch
60
75
- Unit tests run on multiple Node.js versions:
76
+
- Node.js 12.x (using Jest 27.x for compatibility)
77
+
- Node.js 14.x (using Jest 29.x for compatibility)
61
78
- Node.js 16.x (using Jest 29.x for compatibility)
62
79
- Node.js 18.x, 20.x, 22.x, 24.x (using Jest 30.x)
63
-
- E2E tests run after unit tests pass
80
+
- E2E tests run separately using Playwright
64
81
- Manual test runs can be triggered from the Actions tab in GitHub
65
82
66
83
Test results and artifacts are stored for 7 days and can be downloaded from the GitHub Actions workflow runs.
0 commit comments