From 3837b07bfdd15bc8526523048d0c59c9d3fab626 Mon Sep 17 00:00:00 2001 From: Jojo Date: Thu, 23 May 2024 14:33:04 -0300 Subject: [PATCH] add: example package to follow guidelines --- packages/__example__/README.md | 3 +++ packages/__example__/__test__/example.test.ts | 5 +++++ packages/__example__/package.json | 19 +++++++++++++++++++ packages/__example__/src/index.ts | 3 +++ .../__test__/handlers/example.test.js | 8 -------- 5 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 packages/__example__/README.md create mode 100644 packages/__example__/__test__/example.test.ts create mode 100644 packages/__example__/package.json create mode 100644 packages/__example__/src/index.ts delete mode 100644 packages/serverless/__test__/handlers/example.test.js diff --git a/packages/__example__/README.md b/packages/__example__/README.md new file mode 100644 index 0000000..31233d6 --- /dev/null +++ b/packages/__example__/README.md @@ -0,0 +1,3 @@ +## Example Package + +Easily kickoff a package replicating this structure. \ No newline at end of file diff --git a/packages/__example__/__test__/example.test.ts b/packages/__example__/__test__/example.test.ts new file mode 100644 index 0000000..5d7810b --- /dev/null +++ b/packages/__example__/__test__/example.test.ts @@ -0,0 +1,5 @@ +import { describe, it } from 'vitest' + +describe('examplePackage test', () => { + it.skip("Implement tests") +}); diff --git a/packages/__example__/package.json b/packages/__example__/package.json new file mode 100644 index 0000000..f7dc5b7 --- /dev/null +++ b/packages/__example__/package.json @@ -0,0 +1,19 @@ +{ + "name": "@hyperhub/example", + "private": true, + "version": "0.0.0", + "scripts": { + "build": "tsc -p tsconfig.json", + "lint": "eslint --fix --ext .js,.jsx,.ts,.tsx src", + "test": "vitest", + "coverage": "vitest run --coverage", + "tsc": "tsc --noEmit" + }, + "devDependencies": { + "@hyperhub/errors": "workspace:*", + "@hyperhub/test-config": "workspace:*", + "@hyperhub/typescript-config": "workspace:*", + "typescript": "4.9.4", + "vitest": "1.6.0" + } +} diff --git a/packages/__example__/src/index.ts b/packages/__example__/src/index.ts new file mode 100644 index 0000000..1aa358e --- /dev/null +++ b/packages/__example__/src/index.ts @@ -0,0 +1,3 @@ +export const example = () => { + // Implement +}; \ No newline at end of file diff --git a/packages/serverless/__test__/handlers/example.test.js b/packages/serverless/__test__/handlers/example.test.js deleted file mode 100644 index 6375ef2..0000000 --- a/packages/serverless/__test__/handlers/example.test.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const vitest_1 = require("vitest"); -(0, vitest_1.describe)('exampleHandler', () => { - (0, vitest_1.test)('Sample exampleHandler test', () => { - (0, vitest_1.expect)(true).toBe(true); - }); -});