Skip to content

Commit 14f19d2

Browse files
chore: remove integration tests (#2153)
* chore: remove integration tests * set type for a labeled expression * skip vite tests on windows, because they are flaky
1 parent 7540adb commit 14f19d2

File tree

7 files changed

+48
-67
lines changed

7 files changed

+48
-67
lines changed

.github/workflows/main-suite.yml

-3
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ jobs:
7474
- name: Test Public Typings
7575
run: yarn test:tsd
7676

77-
- name: Integration Testing
78-
run: yarn test:integration
79-
8077
- name: E2E Testing
8178
run: yarn test:e2e
8279

.github/workflows/release.yml

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ jobs:
4141
- name: Linting & Types
4242
run: yarn lint:all
4343

44-
- name: Integration Testing
45-
run: yarn test:integration
46-
4744
- name: Creates local .npmrc
4845
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
4946

CONTRIBUTING.md

+42-40
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ This project and everyone participating in it are governed by the [Code of Condu
1212

1313
The documentation is based on [Docusaurus](https://docusaurus.io/) framework. Source inside the [website](https://github.com/lingui/js-lingui/tree/main/website) directory.
1414

15-
- Go to the `website` directory:
15+
- Go to the `website` directory:
1616

1717
```sh
1818
cd website
1919
```
2020

2121
- Install dependencies:
2222

23-
```sh
24-
yarn install
25-
```
23+
```sh
24+
yarn install
25+
```
2626

2727
- To build the docs, watch for changes and preview documentation locally at [http://localhost:3000/](http://localhost:3000/):
2828

29-
```sh
30-
yarn start
31-
```
29+
```sh
30+
yarn start
31+
```
3232

3333
- It's also possible to run `yarn build` for single build. Incremental builds are much faster than the first one as only changed files are built.
3434

3535
- Please lint and validate the documentation before submitting any changes:
3636

37-
```sh
38-
yarn lint
39-
yarn checkFormat
40-
```
37+
```sh
38+
yarn lint
39+
yarn checkFormat
40+
```
4141

4242
## Contributing the code
4343

@@ -68,10 +68,6 @@ This project uses [yarn][yarninstall] package manager. Please follow [official][
6868
yarn test
6969
```
7070

71-
> **Note**
72-
> If you are using an IDE to run test make sure to use the right Jest config.
73-
> For unit tests use `-c jest.config.js`. Integration tests use build packages (created using `yarn release:build`) and config `-c jest.config.integration.js`. See [package.json](./package.json) for more info.
74-
7571
### Using development version in your project
7672

7773
After you successfully fix a bug or add a new feature, you most probably want to test it in a real-world project as soon as possible.
@@ -84,44 +80,50 @@ There are two documented ways to do this: first is a generic way described in th
8480

8581
1. Run `verdaccio` locally in docker (follow [verdaccio guide](https://verdaccio.org/docs/en/what-is-verdaccio.html) if you don't want to run it in Docker):
8682

87-
```sh
88-
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
89-
```
83+
```sh
84+
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
85+
```
9086

91-
> Make sure that your verdaccio user is the same that appears in verdacio-release.js script.
87+
> Make sure that your verdaccio user is the same that appears in verdacio-release.js script.
9288
9389
2. Publish local build of packages to registry. Run local release script:
9490

95-
```sh
96-
yarn verdaccio:release
97-
```
91+
```sh
92+
yarn verdaccio:release
93+
```
9894

9995
3. If you enter inside http://0.0.0.0:4873 (verdaccio instance), you will see your packages published, so you're ready to install them.
10096

10197
4. Inside your project, run:
10298

103-
with NPM:
104-
```sh
105-
# Point to your local registry
106-
npm config set registry http://0.0.0.0:4873/
107-
# Run update-by-scope will update all @lingui packages
108-
npx update-by-scope @lingui
109-
```
110-
with Yarn Classic (1.*):
111-
```sh
112-
yarn upgrade --scope @lingui --registry http://0.0.0.0:4873/ --latest
113-
```
114-
with Yarn Berry:
115-
```sh
116-
YARN_NPM_REGISTRY_SERVER=http://0.0.0.0:4873/ yarn up "@lingui/*"
117-
```
99+
with NPM:
100+
101+
```sh
102+
# Point to your local registry
103+
npm config set registry http://0.0.0.0:4873/
104+
# Run update-by-scope will update all @lingui packages
105+
npx update-by-scope @lingui
106+
```
107+
108+
with Yarn Classic (1.\*):
109+
110+
```sh
111+
yarn upgrade --scope @lingui --registry http://0.0.0.0:4873/ --latest
112+
```
113+
114+
with Yarn Berry:
115+
116+
```sh
117+
YARN_NPM_REGISTRY_SERVER=http://0.0.0.0:4873/ yarn up "@lingui/*"
118+
```
119+
118120
5. After you make some changes, you need to run the same process. (Releasing + yarn upgrade)
119121

120122
6. When finished testing, restore default registry (only for NPM)
121123

122-
```sh
123-
npm config set registry https://registry.npmjs.org/
124-
```
124+
```sh
125+
npm config set registry https://registry.npmjs.org/
126+
```
125127

126128
#### Testing changes using the React Native example
127129

jest.config.integration.js

-17
This file was deleted.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
"test": "jest",
1212
"test:ci": "jest --ci --runInBand",
1313
"test:ci:coverage": "yarn test:ci --coverage",
14-
"test:integration": "yarn node --experimental-vm-modules $(yarn bin jest) -c jest.config.integration.js",
1514
"test:e2e": "yarn workspaces foreach -p run test:e2e",
1615
"test:tsd": "jest -c jest.config.types.js",
17-
"test:all": "yarn test && yarn test:integration && yarn test:e2e && yarn test:tsd",
16+
"test:all": "yarn test && yarn test:e2e && yarn test:tsd",
1817
"lint:types": "tsc",
1918
"lint:eslint": "eslint ./packages",
2019
"lint:all": "yarn lint:eslint && yarn lint:types",

packages/core/macro/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,4 @@ export const msg: typeof defineMessage
232232
/**
233233
* Helps to define a name for a variable in the message
234234
*/
235-
export function ph(def: LabeledExpression): string
235+
export function ph(def: LabeledExpression<string | number>): string

packages/vite-plugin/test/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import path from "path"
22
import { exec as _exec } from "child_process"
33
import { mkdtempSync } from "fs"
44
import os from "os"
5+
import { platform } from "node:os"
56

6-
describe("vite-plugin", () => {
7+
const skipOnWindows = platform() === "win32" ? describe.skip : describe
8+
9+
skipOnWindows("vite-plugin", () => {
710
it("should return compiled catalog", async () => {
811
const mod = await runVite(`po-format/vite.config.ts`)
912
expect((await mod.load()).messages).toMatchSnapshot()

0 commit comments

Comments
 (0)