@zuplo/test 1.4.0 → 1.4.4
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.
- package/README.md +35 -4
- package/dist/index.d.ts +2 -0
- package/package.json +13 -32
package/README.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
# @zuplo/
|
|
1
|
+
# @zuplo/test
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Type definitions for the test constructs (`describe`, `it`, `beforeEach`, …) and
|
|
4
|
+
the `TestHelper` object that `@zuplo/cli` injects when it runs a Zuplo project's
|
|
5
|
+
tests. There is no runtime code here — the implementation is generated by the
|
|
6
|
+
CLI — so `dist/index.d.ts` is hand-maintained rather than compiled.
|
|
7
|
+
|
|
8
|
+
This package was moved here from the standalone `zuplo/test` repository.
|
|
9
|
+
|
|
10
|
+
## Releasing
|
|
11
|
+
|
|
12
|
+
`@zuplo/test` is **not** published as part of a core release. It has its own tag
|
|
13
|
+
prefix (`test-v`) and its own workflow, so a version only goes out when someone
|
|
14
|
+
asks for one:
|
|
15
|
+
|
|
16
|
+
1. Run the **Run Release** workflow and pick `@zuplo/test` as the product.
|
|
17
|
+
2. That computes and pushes the next `test-v<major>.<minor>.<patch>` tag.
|
|
18
|
+
3. Pushing the tag runs
|
|
19
|
+
[`release-test.yaml`](../../.github/workflows/release-test.yaml), which
|
|
20
|
+
publishes to npmjs.com and GitHub Packages and cuts a GitHub release.
|
|
21
|
+
|
|
22
|
+
The `version` field below is informational — the release workflow overwrites it
|
|
23
|
+
with the version from the tag before publishing. Because there are no existing
|
|
24
|
+
`test-v*` tags yet, the first release seeds its version from that field.
|
|
25
|
+
|
|
26
|
+
Consequences of being outside the core release:
|
|
27
|
+
|
|
28
|
+
- `packages/test` is excluded from the npm workspaces list, so `@zuplo/test`
|
|
29
|
+
still resolves from the registry for local development and CI type-checking.
|
|
30
|
+
Editing `dist/index.d.ts` here does not change what `npm ci` installs until a
|
|
31
|
+
release goes out.
|
|
32
|
+
- `scripts/set-versions.mjs` skips this directory so core releases don't
|
|
33
|
+
overwrite the version.
|
|
34
|
+
- After releasing a new version, bump the `@zuplo/test` pin in
|
|
35
|
+
[`packages/zuplo/package.json`](../zuplo/package.json) (and refresh the
|
|
36
|
+
lockfile) if the meta-package should ship the new types.
|
package/dist/index.d.ts
CHANGED
|
@@ -16,12 +16,14 @@ declare module "@zuplo/test" {
|
|
|
16
16
|
export namespace describe {
|
|
17
17
|
const ignore: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
|
|
18
18
|
const only: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
|
|
19
|
+
const skip: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export function it<T>(name: string, fn: () => void | Promise<void>): TestSuite<T>;
|
|
22
23
|
export namespace it {
|
|
23
24
|
const ignore: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
|
|
24
25
|
const only: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
|
|
26
|
+
const skip: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
// These are the helpers
|
package/package.json
CHANGED
|
@@ -1,44 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/test",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"
|
|
5
|
+
"description": "Type definitions for the Zuplo test runner",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/zuplo/core"
|
|
9
|
+
},
|
|
6
10
|
"author": "Zuplo, Inc.",
|
|
11
|
+
"license": "Copyright 2022",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
7
13
|
"exports": {
|
|
8
14
|
".": {
|
|
9
15
|
"types": "./dist/index.d.ts"
|
|
10
16
|
}
|
|
11
17
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
18
|
+
"files": [
|
|
19
|
+
"README.md",
|
|
20
|
+
"dist/index.d.ts"
|
|
21
|
+
],
|
|
17
22
|
"engines": {
|
|
18
23
|
"node": ">=18.0.0"
|
|
19
|
-
}
|
|
20
|
-
"lint-staged": {
|
|
21
|
-
"**/*.{ts,json,md,yml,js,css,html}": [
|
|
22
|
-
"prettier --write"
|
|
23
|
-
],
|
|
24
|
-
"**/*.{ts,js}": [
|
|
25
|
-
"eslint --cache --fix --ignore-path .eslintignore"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@types/node": "^18.11.5",
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^5.42.0",
|
|
31
|
-
"@typescript-eslint/parser": "^5.42.0",
|
|
32
|
-
"eslint": "^8.26.0",
|
|
33
|
-
"eslint-config-prettier": "^8.5.0",
|
|
34
|
-
"eslint-plugin-import": "^2.26.0",
|
|
35
|
-
"eslint-plugin-node": "^11.1.0",
|
|
36
|
-
"eslint-plugin-unicorn": "^44.0.2",
|
|
37
|
-
"husky": "^8.0.1",
|
|
38
|
-
"lint-staged": "^13.0.3",
|
|
39
|
-
"prettier": "^2.7.1",
|
|
40
|
-
"prettier-plugin-organize-imports": "^3.1.1",
|
|
41
|
-
"typescript": "^4.8.4"
|
|
42
|
-
},
|
|
43
|
-
"dependencies": {}
|
|
24
|
+
}
|
|
44
25
|
}
|