{"_id":"@awesome-nodes/unittest","_rev":"1-b11b93c971c28d6fdbc0d87429cd22f8","name":"@awesome-nodes/unittest","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@awesome-nodes/unittest","version":"1.0.0","description":"Unittest OO framework for converting functional unittest lifecycle hooks into callable object model signatures.","keywords":["application","development","object","oriented","framework","unittest","lifecycle","object","model","best","practice","awesome","nodes","tdd"],"license":"MIT","author":{"name":"Christian Kusmanow","email":"christian.kusmanow@teslasoft.de"},"contributors":[{"name":"Markus Faatz","email":"mail@markus.faatz.com"}],"repository":{"type":"git","url":"git+ssh://git@gitlab.com/awesome-nodes/unittest.git"},"scripts":{"test":"concurrently \"npm run tscheck\" \"npm run test:cov\" \"npm run typecov\"","test:r":"npx jest --runInBand --verbose","test:w":"npm run test:r -- --watch","test:cov":"npm run test:r -- --collectCoverage","test:d":"node --inspect-brk node_modules/jest/bin/jest --runInBand --testMatch \"<rootDir>/src/**/*.spec.ts\"","typecov":"npx type-coverage --detail","tscheck":"echo tscheck... && tsc --project tsconfig.tscheck.json","tscheck:w":"npm run tscheck -- --watch","tscheck:circular":"dpdm ./src/**/*.ts","eslint":"eslint --report-unused-disable-directives **/*.ts","eslint:fix":"npm run eslint -- --fix","start":"node -r ts-node/register -r tsconfig-paths/register ./src","type-check":"tsc --noEmit","type-check:watch":"npm run type-check -- --watch","build":"concurrently \"npm run build:es\" \"npm run build:umd\"","build:es":"bs bundle-babel -a","build:umd":"bs bundle-webpack","build:watch":"cross-env NODE_ENV=development concurrently \"npm run build:es -- -w\" \"npm run build:umd -- -w\"","prepack":"npm run build","prepublishOnly":"npm run test"},"devDependencies":{"@awesome-nodes/build-system":"^0.3.2","@types/jest":"^27.0.3","@typescript-eslint/eslint-plugin":"5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"5.7.0","@zerollup/ts-transform-paths":"1.7.17","concurrently":"6.5.1","cross-env":"7.0.3","debug-mode":"^2.0.2","dpdm":"^3.5.0","eslint":"^7.28.0","eslint-plugin-eslint-plugin":"^4.1.0","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-unicorn":"^39.0.0","glob":"^7.1.6","jest":"^27.4.5","pre-commit":"^1.2.2","simplytyped":"^3.3.0","source-map-support":"^0.5.21","ts-jest":"^27.1.2","ts-node":"^10.0.0","tsconfig-paths":"^3.9.0","tslib":"^2.3.1","tslint":"^6.1.3","tslint-clean-code":"^0.2.10","type-coverage":"^2.19.0","typescript":"4.1.3"},"dependencies":{"@awesome-nodes/injection-factory":"^1.0.0","@awesome-nodes/object":"^1.0.0","simplytyped":"^3.3.0"},"peerDependencies":{"@awesome-nodes/injection-factory":">= 1.0.0","@awesome-nodes/object":">= 1.0.0","rxjs":">= 6.x"},"directories":{"lib":"lib","lib-esm":"lib-esm"},"main":"lib/index.js","module":"lib-esm/index.js","jsnext:main":"lib-esm/index.js","types":"lib","pre-commit":["test"],"gitHead":"31fe43eb8a65c078080df65380a16f78067c7d16","bugs":{"url":"https://gitlab.com/awesome-nodes/unittest/issues"},"homepage":"https://gitlab.com/awesome-nodes/unittest#readme","_id":"@awesome-nodes/unittest@1.0.0","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-sj3TaQaLTMq1QLDdSOGRwi1sZq179epmk6ru82ziAkaxFCG8I3aeSA6Z2DJUFKrG/XQiX1VGpfRR2GtJtO822g==","shasum":"e907703402e7776718edb1ab86188998394d7e5c","tarball":"https://registry.npmjs.org/@awesome-nodes/unittest/-/unittest-1.0.0.tgz","fileCount":37,"unpackedSize":119006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1tC4CRA9TVsSAnZWagAALmYP/iSgh5aGxdrTCxF2riTz\nFBbpZl9LLeuBmEauiKKM6n1/QkiLmy+u7m74eqgrbhDmAqatCNZCuR3t33C0\nRH/bWrn/X6zMM4CXEnd4NByzy+U3CpCoBL4Bj2G5j5amfHUV3wUanyH4E8/n\n9axkGM0CyFlICA34a3/FRYY7xnrcl1ZJ6LimCfXcprYeWU8WPb8A20OdrN0r\nk7A5p10jqE5IqqiiEGp1FeJU8EN6SfbuHDymE8V6RTf8UfMyQF1NO8cQiWvy\n1PrBmtK3ZapC08YCdePY64XO9+qYAi+nE0UF+XcqzeratHyx3sUMqmVMbCR+\nh0SfKK6NOvOf5m/j2xfgntyUhrOUZ3CICJPqla2ETviZxdwjxzW10Wos25AX\nXVzvUg0Tl9nliOE8ox+enuz2ZkD2/1H7qq9v369gUbqkrq7WwMjUcgFFtQLE\nBALloYLGm6ro+11zTgeTjtg4XbXyO8G8QPL6H5qjOQlPxLUxEuy0uQ0eHSAB\neYn4Q80Qgu+Qyx2YmUMSJDjzkv6h9X7v1pkQTGCwav4SDEuxwGmXmxhZYg6P\nj882MzwajWvZQV4gHkJbVxGuCeiTG5HMsWMyZuDngf/MIJ5ZblxQTFuBNKid\nLl1v5tjn3vbAT4NM2HqTe95S/DLRml4O/vMRBrpKXASXZUXF7dwAoMqBWi4y\niMP6\r\n=SdgU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOFTT8G8IE4u9F3UbaqtFQLnXsYk3fShakpNaQC0QxgAIhAMKqknhoxugsjS7y0RnYZ9slRmggaCMPJni7++nm6si6"}]},"_npmUser":{"name":"christian.kusmanow","email":"christian.kusmanow@teslasoft.de"},"maintainers":[{"name":"christian.kusmanow","email":"christian.kusmanow@teslasoft.de"},{"name":"markusfaatz","email":"markus.faatz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unittest_1.0.0_1641468088724_0.8757324502145458"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-06T11:21:28.676Z","1.0.0":"2022-01-06T11:21:28.854Z","modified":"2022-04-04T16:51:03.947Z"},"maintainers":[{"name":"christian.kusmanow","email":"christian.kusmanow@teslasoft.de"},{"name":"markusfaatz","email":"markus.faatz@gmail.com"}],"description":"Unittest OO framework for converting functional unittest lifecycle hooks into callable object model signatures.","homepage":"https://gitlab.com/awesome-nodes/unittest#readme","keywords":["application","development","object","oriented","framework","unittest","lifecycle","object","model","best","practice","awesome","nodes","tdd"],"repository":{"type":"git","url":"git+ssh://git@gitlab.com/awesome-nodes/unittest.git"},"contributors":[{"name":"Markus Faatz","email":"mail@markus.faatz.com"}],"author":{"name":"Christian Kusmanow","email":"christian.kusmanow@teslasoft.de"},"bugs":{"url":"https://gitlab.com/awesome-nodes/unittest/issues"},"license":"MIT","readme":"<h1 align=\"center\">Welcome to Awesome Nodes Unittest Library 👋<br/>\n<small></small>\n</h1>\n\n<p>\n  <img alt=\"Version\" src=\"https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000\" />\n  <a href=\"https://manyfolds.atlassian.net/wiki\" target=\"_blank\">\n    <img alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" />\n  </a>\n  <a href=\"#\" target=\"_blank\">\n    <img alt=\"Code Style: 4-space K&R.\" src=\"https://img.shields.io/badge/code%20style-4--space%20K%26R-brightgreen?style=flat\" />\n  </a>\n  <a href=\"#\" target=\"_blank\">\n    <img alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-brightgreen.svg\" />\n  </a>\n</p>\n\n> 🔎 Unittest OO framework for converting functional unittest lifecycle hooks into callable object model signatures<br/>\n> <small>Provides implementation of reusable test case signatures.</small>\n\n### 🏠 [Homepage][ProjectSite]\n\n### ✨ [Demo][ProjectDemoSite]\n\n## Write Awesome Unittests\n\n1. #### Inject the lifecycle functions of your unittest framework (jest, jasmine, mocha, ...)\n    * afterAll\n    * afterEach\n    * beforeAll\n    * beforeEach\n\n      ### Example:\n   Create an `index.ts` file located at your unittest configuration directory (usually `src/unittest`)\n   and paste the following contents:\n   ```typescript\n   import { AFTER_ALL_TOKEN, AFTER_EACH_TOKEN, BEFORE_ALL_TOKEN, BEFORE_EACH_TOKEN } from '@awesome-nodes/unittest';\n   \n   \n   AFTER_ALL_TOKEN.scope.addProvider({ provide: AFTER_ALL_TOKEN, useValue: afterAll, scope: AFTER_ALL_TOKEN.Scope });\n   AFTER_EACH_TOKEN.scope.addProvider({ provide: AFTER_EACH_TOKEN, useValue: afterEach, scope: AFTER_EACH_TOKEN.Scope });\n   BEFORE_ALL_TOKEN.scope.addProvider({ provide: BEFORE_ALL_TOKEN, useValue: beforeAll, scope: BEFORE_ALL_TOKEN.Scope });\n   BEFORE_EACH_TOKEN.scope.addProvider({ provide: BEFORE_EACH_TOKEN, useValue: beforeEach, scope: BEFORE_EACH_TOKEN.Scope });\n   \n   export * from '@awesome-nodes/unittest';\n   ```\n2. Adjust your `tsconfig.json`\n   ```\n   {\n     \"compilerOptions\": {\n       \"paths\": {\n         \"unittest\": [\"src/unittest\"],\n       }\n     }\n   }\n   ```\n3. Write awesome unittests\n\n   `AwesomeTestCase.spec.ts`\n    ```typescript\n    import { itShould, TestCase } from 'unittest';\n    \n\n    class AwesomeTestCase extends TestCase\n    {\n        test(): void\n        {\n            itShould('test things the awesome way', () =>\n            {\n                // Arrange\n           \n                // Act\n           \n                // Assert\n            });\n        }\n   }\n   new AwesomeTestCase;\n   ```\n   A full example is available in [src/unittest/TestCase.spec.ts][UnittestExample].\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing\npurposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\n* Node.js (Version >= 12) ([Download](https://nodejs.org/en/download/))\n* Git (Version >= 2) ([Download](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git))\n\n### Download\n\n```\ngit clone git+ssh://git@gitlab.com/awesome-nodes/unittest.git\n```\n\n### Install\n\n```sh\ncd unittest\nnpm install\n```\n\n### Usage\n```sh\nnpm run start\n```\n\n### Run Unit Tests\nSingle Run:\n```sh\nnpm run test\n```\nRun in watch mode:\n```sh\nnpm run test:w\n```\n\n### Run TypeScript Check\nSingle Run:\n```sh\nnpm run tscheck\n```\nRun in watch mode:\n```sh\nnpm run tscheck:w\n```\n\n### Run Circular Dependency Check\n```sh\nnpm run tscheck:circular\n```\n\n### Run Coding Style Tests\n\n```sh\nnpm run eslint\n```\n\n### Run Build\nThe build output contains three kinds of library variants:\n* ES5 for NodeJS applications\n* ES6 for tree shaking builds\n* and a UMD bundle for web applications\n```sh\nnpm run build\n```\n\n## Deployment\n> Deployment is done by publishing the npm package using:\n```sh\nnpm publish\n```\n\n## Built With\n* [BuildSystem](https://gitlab.com/awesome-nodes/build-system) - Integrated Zero Configuration Build System for Awesome Nodes Apps and Framework Components\n\n## 👤 Authors\n\n* **Christian Kusmanow <christian.kusmanow@teslasoft.de>** - *Initial work* - [Teslasoft](https://gitlab.com/teslasoft.de)\n\nSee also the list of [contributors](https://gitlab.com/groups/awesome-nodes/-/group_members) who participated in this project.\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!<br />Feel free to check our [issues page](https://gitlab.com/awesome-nodes/build-system/issues).\n\nPlease read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\nPlease read the [DEVELOPING.md](./DEVELOPING.md) for details on how to develop this repository. \n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://gitlab.com/awesome-nodes/build-system/-/tags). \n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## License\n\n[MIT](./LICENSE)\n\n***\n_This README was generated initially with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n\n[ProjectSite]: https://gitlab.com/awesome-nodes/unittest\n\n[ProjectDemoSite]: https://unittest.demo.awesome-nodes.com\n\n[UnittestExample]: ./src/unittest/TestCase.spec.ts\n","readmeFilename":"README.md"}