diff --git a/.gitea/workflows/default_nottags.yaml b/.gitea/workflows/default_nottags.yaml index 9f4e743..2d7e72a 100644 --- a/.gitea/workflows/default_nottags.yaml +++ b/.gitea/workflows/default_nottags.yaml @@ -6,8 +6,8 @@ on: - '**' env: - IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci - NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git + IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci + NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}} @@ -26,7 +26,7 @@ jobs: - name: Install pnpm and npmci run: | pnpm install -g pnpm - pnpm install -g @shipzone/npmci + pnpm install -g @ship.zone/npmci - name: Run npm prepare run: npmci npm prepare diff --git a/.gitea/workflows/default_tags.yaml b/.gitea/workflows/default_tags.yaml index e27ad69..6e8064b 100644 --- a/.gitea/workflows/default_tags.yaml +++ b/.gitea/workflows/default_tags.yaml @@ -6,8 +6,8 @@ on: - '*' env: - IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci - NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git + IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci + NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}} @@ -26,7 +26,7 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @shipzone/npmci + pnpm install -g @ship.zone/npmci npmci npm prepare - name: Audit production dependencies @@ -54,7 +54,7 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @shipzone/npmci + pnpm install -g @ship.zone/npmci npmci npm prepare - name: Test stable @@ -82,7 +82,7 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @shipzone/npmci + pnpm install -g @ship.zone/npmci npmci npm prepare - name: Release @@ -104,7 +104,7 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @shipzone/npmci + pnpm install -g @ship.zone/npmci npmci npm prepare - name: Code quality diff --git a/changelog.md b/changelog.md index b25fdd9..ca3b0ec 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2024-11-06 - 5.4.1 - fix(ci) +Fix CI configuration URL and package installation paths. + +- Updated Docker image URL in CI config. +- Fixed repository URL format in package.json. +- Corrected npmci package installation path. + ## 2024-11-06 - 5.4.0 - feat(node) Add smartmongo and smarts3 integration in node tools diff --git a/package.json b/package.json index 8ae54ec..6f92590 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,14 @@ }, "repository": { "type": "git", - "url": "https://code.foss.global/push.rocks/tapbundle.git" + "url": "git+https://code.foss.global/push.rocks/tapbundle.git" }, "author": "Lossless GmbH", "license": "MIT", "bugs": { - "url": "https://gitlab.com/pushrocks/tapbundle/issues" + "url": "https://code.foss.global/push.rocks/tapbundle/issues" }, - "homepage": "https://code.foss.global/push.rocks/tapbundle", + "homepage": "https://code.foss.global/push.rocks/tapbundle#readme", "dependencies": { "@open-wc/testing": "^4.0.0", "@push.rocks/consolecolor": "^2.0.2", @@ -74,4 +74,4 @@ "web helpers", "test utilities" ] -} +} \ No newline at end of file diff --git a/readme.md b/readme.md index 5794792..b005700 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,9 @@ # @push.rocks/tapbundle + tap bundled for tapbuffer ## Install + Install the package by running the following command in your terminal: ```bash @@ -11,9 +13,11 @@ npm install @push.rocks/tapbundle --save-dev This will add `@push.rocks/tapbundle` to your project's `devDependencies`. ## Usage + The `@push.rocks/tapbundle` package is a tap-compatible testing framework written in TypeScript, intended for use with tapbuffer. It includes a range of useful features enabling easy setup and execution of tests, assertion handling through `expect` and `expectAsync`, as well as auxiliary tools for delay and colored console output. ### Getting Started + First, ensure your project is set up with Typescript and supports ESM syntax. You can then import `tap`, `expect`, and `expectAsync` from `@push.rocks/tapbundle` to start defining your tests. ```typescript @@ -33,6 +37,7 @@ tap.start(); ``` ### Defining Tests + You can define tests with descriptions and async functions. The `tap` instance manages test execution, supports test skipping, and managing exclusive tests with the `.only` modifier. ```typescript @@ -52,6 +57,7 @@ tap.start(); ``` ### Using `expect` and `expectAsync` + The package provides `expect` and `expectAsync` for assertions: ```typescript @@ -60,6 +66,7 @@ expect(5).toBeGreaterThan(2); ``` ### Handling Asynchronous Operations + `tapbundle` facilitates working with async operations in tests. You can introduce delays or set timeouts: ```typescript @@ -72,7 +79,9 @@ tap.start(); ``` ### Advanced Usage + #### Pre Tasks + You can define tasks to run before test execution begins: ```typescript @@ -88,6 +97,7 @@ tap.start(); ``` #### Accessing Test Metadata + Each test returns a `TapTest` instance, from which you can access metadata and manipulate test behavior: ```typescript @@ -102,9 +112,11 @@ tap.start().then(() => { ``` ### Running Tests + Tests are executed by calling `tap.start()`. This method runs all defined tests in sequence and respects `.skip` and `.only` modifiers. ### Debugging and Output + `@push.rocks/tapbundle` supports colored console output via `consolecolor` to help with debugging and test result readability: ```typescript @@ -120,7 +132,7 @@ This detailed guide covers the most important aspects of using `@push.rocks/tapb ## License and Legal Information -This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. +This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. diff --git a/test/test.browser.nonci.ts b/test/test.browser.nonci.ts index 03ada50..76e464c 100644 --- a/test/test.browser.nonci.ts +++ b/test/test.browser.nonci.ts @@ -23,10 +23,10 @@ const test3 = tap.test( async () => { expect( (await test1.testPromise).hrtMeasurement.milliSeconds < - (await test2).hrtMeasurement.milliSeconds + (await test2).hrtMeasurement.milliSeconds, ).toBeTrue(); expect((await test2.testPromise).hrtMeasurement.milliSeconds > 10).toBeTrue(); - } + }, ); const test4 = tap.skip.test('my 4th test -> should fail', async (tools) => { diff --git a/test/test.ts b/test/test.ts index 890ac2d..24be382 100644 --- a/test/test.ts +++ b/test/test.ts @@ -17,10 +17,10 @@ const test3 = tap.test( async () => { expect( (await test1.testPromise).hrtMeasurement.milliSeconds < - (await test2).hrtMeasurement.milliSeconds + (await test2).hrtMeasurement.milliSeconds, ).toBeTrue(); expect((await test2.testPromise).hrtMeasurement.milliSeconds > 1000).toBeTrue(); - } + }, ); const test4 = tap.test('my 4th test -> should fail', async (tools) => { diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 6e1b4b5..4f1010b 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/tapbundle', - version: '5.4.0', + version: '5.4.1', description: 'A test automation library bundling utilities and tools for TAP (Test Anything Protocol) based testing, specifically tailored for tapbuffer.' } diff --git a/ts/tapbundle.classes.tap.ts b/ts/tapbundle.classes.tap.ts index 3f5cc07..05ddc4b 100644 --- a/ts/tapbundle.classes.tap.ts +++ b/ts/tapbundle.classes.tap.ts @@ -37,7 +37,7 @@ export class Tap { public test( testDescription: string, testFunction: ITestFunction, - modeArg: 'normal' | 'only' | 'skip' = 'normal' + modeArg: 'normal' | 'only' | 'skip' = 'normal', ): TapTest { const localTest = new TapTest({ description: testDescription, @@ -67,7 +67,7 @@ export class Tap { description: testDescription, testFunction, parallel: true, - }) + }), ); } @@ -125,7 +125,7 @@ export class Tap { failReasons.push( `Test ${tapTest.testKey + 1} failed with status ${tapTest.status}:\n` + `|| ${tapTest.description}\n` + - `|| for more information please take a look the logs above` + `|| for more information please take a look the logs above`, ); } } @@ -150,7 +150,7 @@ export class Tap { } else { setTimeout(() => { process.exit(codeArg); - }, 10) + }, 10); } } diff --git a/ts/tapbundle.classes.taptest.ts b/ts/tapbundle.classes.taptest.ts index 1715e7c..e4c2936 100644 --- a/ts/tapbundle.classes.taptest.ts +++ b/ts/tapbundle.classes.taptest.ts @@ -56,7 +56,7 @@ export class TapTest { } this.hrtMeasurement.stop(); console.log( - `ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms` + `ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`, ); this.status = 'success'; this.testDeferred.resolve(this); @@ -64,7 +64,7 @@ export class TapTest { } catch (err: any) { this.hrtMeasurement.stop(); console.log( - `not ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms` + `not ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`, ); this.testDeferred.resolve(this); this.testResultDeferred.resolve(err); diff --git a/tsconfig.json b/tsconfig.json index dfe5a55..2413b93 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,9 +6,11 @@ "module": "NodeNext", "moduleResolution": "NodeNext", "esModuleInterop": true, - "verbatimModuleSyntax": true + "verbatimModuleSyntax": true, + "baseUrl": ".", + "paths": {} }, "exclude": [ "dist_*/**/*.d.ts" ] -} +} \ No newline at end of file