@zuplo/test 1.0.2

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 ADDED
@@ -0,0 +1,4 @@
1
+ # @zuplo/core
2
+
3
+ This is a simple placeholder package to hold the type definitions for @zuplo/test.
4
+ We do not have any code in this package because the code is dynamically generated by @zuplo/cli.
@@ -0,0 +1,31 @@
1
+ // This is a very basic placeholder of types for @zuplo/test that we will support
2
+ // It's a simplification of things allowed in the Deno bdd module
3
+
4
+ declare module "@zuplo/test" {
5
+ // These are the test constructs
6
+ export interface TestSuite<T> {
7
+ symbol: symbol;
8
+ }
9
+
10
+ export function afterAll<T>(fn: (this: T) => void | Promise<void>);
11
+ export function afterEach<T>(fn: (this: T) => void | Promise<void>);
12
+ export function beforeAll<T>(fn: (this: T) => void | Promise<void>);
13
+ export function beforeEach<T>(fn: (this: T) => void | Promise<void>);
14
+
15
+ export function describe<T>(name: string, fn: () => void | Promise<void>): TestSuite<T>;
16
+ export namespace describe {
17
+ const ignore: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
18
+ const only: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
19
+ }
20
+
21
+ export function it<T>(name: string, fn: () => void | Promise<void>): TestSuite<T>;
22
+ export namespace it {
23
+ const ignore: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
24
+ const only: <T>(name: string, fn: () => void | Promise<void>) => TestSuite<T>;
25
+ }
26
+
27
+ // These are the helpers
28
+ export const TestHelper: {
29
+ TEST_URL: string
30
+ }
31
+ }
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@zuplo/test",
3
+ "version": "1.0.2",
4
+ "type": "module",
5
+ "repository": "https://github.com/zuplo/test",
6
+ "author": "Zuplo, Inc.",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts"
10
+ }
11
+ },
12
+ "types": "./dist/index.d.ts",
13
+ "license": "Copyright 2022",
14
+ "scripts": {
15
+ "build": "tsc --build"
16
+ },
17
+ "engines": {
18
+ "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": {}
44
+ }