Skip to content

Commit 74de850

Browse files
committed
Update test/README.md
1 parent 70f2888 commit 74de850

File tree

17 files changed

+75
-240
lines changed

17 files changed

+75
-240
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ node_modules/
2222
*.iml
2323
dev*.html
2424
.DS_Store
25+
26+
/test/hyperformula-tests/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"verify:cjs": "node script/check-file.js commonjs",
7676
"verify:publish-package": "npm pack | node script/check-publish-package.js",
7777
"verify:typings": "tsc --noEmit",
78-
"test": "npm-run-all test:fetch-private lint test:jest test:browser",
78+
"test": "npm-run-all lint test:jest test:browser",
7979
"test:fetch-private": "bash test/fetch-tests.sh",
8080
"test:jest": "cross-env NODE_ICU_DATA=node_modules/full-icu jest",
8181
"test:watch": "npm run test:jest -- --watch",

test/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,54 @@ This folder contains only simple smoke tests that verify core HyperFormula funct
55
HyperFormula team maintains a comprehensive test suite that includes unit tests run in different environments, compatibility tests, and performance tests.
66

77
The full test suite is available on request. To obtain it, contact us at [email protected].
8+
9+
## Using the private test suite
10+
11+
The private test suite is kept in the `hyperformula-tests` repository. Once you have access to it, you can use it following this instructions:
12+
13+
Whenenever you switch branch in the main repository, you need to fetch the private test suite to the `test/hyperformula-tests` directory by running:
14+
```
15+
npm run test:fetch-private
16+
17+
```
18+
19+
Then, you can run the test by calling one og the commands:
20+
21+
```
22+
npm run test
23+
npm run test:jest
24+
npm run test:browser
25+
npm run test:coverage
26+
npm run test:performance
27+
npm run test:compatibility
28+
```
29+
30+
## `fetch-tests.sh`
31+
32+
This file is located in the `test` directory.
33+
34+
### What it does
35+
36+
1. **Clone if missing** – If `test/hyperformula-tests` does not exist:
37+
- With `DEPLOY_TOKEN` set: clones via HTTPS using the token
38+
- Otherwise: clones via SSH (`[email protected]:handsontable/hyperformula-tests.git`)
39+
40+
2. **Detect current branch** – Uses:
41+
- `GITHUB_HEAD_REF` (pull request source branch)
42+
- `GITHUB_REF_NAME` (push branch)
43+
- `git rev-parse --abbrev-ref HEAD` (local), falling back to `develop` on detached HEAD
44+
45+
3. **Checkout matching branch** – In `hyperformula-tests`:
46+
- Fetches from `origin`
47+
- Checks out the branch if it exists locally or on `origin`
48+
- Otherwise checks out `develop`
49+
50+
4. **Pull latest** – Runs `git pull origin` on the checked-out branch.
51+
52+
### Environment variables
53+
54+
| Variable | Purpose |
55+
|-----------------|-------------------------------------------------------------------------|
56+
| `DEPLOY_TOKEN` | GitHub token for HTTPS clone (used in CI when SSH is not available) |
57+
| `GITHUB_HEAD_REF` | Source branch for pull requests (set by GitHub Actions) |
58+
| `GITHUB_REF_NAME` | Branch/tag that triggered the workflow (set by GitHub Actions) |

test/_setupFiles/babel.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/_setupFiles/bootstrap.ts

Lines changed: 0 additions & 59 deletions
This file was deleted.

test/_setupFiles/globalSetup.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/_setupFiles/jest/bootstrap.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/_setupFiles/jest/toEqualError.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/_setupFiles/jsdom.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)