{"id":22138712,"url":"https://github.com/tanay-pingalkar/oral","last_synced_at":"2025-07-25T22:32:13.065Z","repository":{"id":50960192,"uuid":"363438767","full_name":"tanay-pingalkar/oral","owner":"tanay-pingalkar","description":"a decorator based testing framework for typescript","archived":false,"fork":false,"pushed_at":"2023-01-07T17:39:53.000Z","size":106,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-11T21:11:58.246Z","etag":null,"topics":["oral","tdd","testing","testing-framework","testing-tools","typescript","typescript-decorators","unit-test"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanay-pingalkar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-01T15:08:09.000Z","updated_at":"2024-09-11T19:50:20.000Z","dependencies_parsed_at":"2023-02-07T18:45:53.405Z","dependency_job_id":null,"html_url":"https://github.com/tanay-pingalkar/oral","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanay-pingalkar%2Foral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanay-pingalkar%2Foral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanay-pingalkar%2Foral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanay-pingalkar%2Foral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanay-pingalkar","download_url":"https://codeload.github.com/tanay-pingalkar/oral/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227621904,"owners_count":17795021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oral","tdd","testing","testing-framework","testing-tools","typescript","typescript-decorators","unit-test"],"created_at":"2024-12-01T20:11:39.116Z","updated_at":"2024-12-01T20:11:39.820Z","avatar_url":"https://github.com/tanay-pingalkar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @ral\n\nan open source decorator based testing framework for typescript\n\n## features\n\n- decorator based testing\n- watch mode\n- async tests with not efforts\n\n## install\n\ncurrently this repo is not released yet so you have to fork and clone the repo before using it. \u003cbr\u003e\nrun `npm install` \u003cbr\u003e\nrun `cd examples \u0026\u0026 npm install` \u003cbr\u003e\nrun `oral` \u003cbr\u003e\n\n## how to write tests in oral\n\nwriting tests in oral is same as writing tests in other framework but in oral, there is no describe and no it, instead of that, it usesname of you class as description of you tests. To get started with it \u003cbr\u003e\n` touch oral.config.ts \u0026\u0026 mkdir tests`\n\n- oral.config.ts\n\n```typescript\nmodule.export = {\n  testDir: \"/tests\",\n};\n```\n\n`cd tests \u0026\u0026 touch firstTest.test.ts`\n\ninside firstTest.test.ts\n\n```typescript\nimport { Suit, Equal } from \"oral\";\n\n@Suite()\nexport class myFirstTest {\n  @Equal(\"this should pass\")\n  thisShouldPass() {\n    return \"this should pass\";\n  }\n\n  @Equal(5)\n  thisShouldFail() {\n    return 2 + 2;\n  }\n}\n```\n\nsave and run\n`oral --watch`\n\n![output](https://github.com/tanay-pingalkar/oral/blob/main/output.png)\n\nand here you go..\n\n## cli options\n\noral `location of config file` `--watch` `--testDir /tests/` `--clear` `--noclear` `--help` `--version` `--notify` `--file name_of_file` \u003cbr\u003e\nall cli options can be inclue in `oral.config.ts`\n\n## Api\n\n`@Equal()` \u003cbr\u003e\n`@Suite()` \u003cbr\u003e\n`@Contain()` \u003cbr\u003e\n`@Match()` \u003cbr\u003e\n`@True()` \u003cbr\u003e\n`@False()` \u003cbr\u003e\n`@GreaterThan()` \u003cbr\u003e\n`@LessThan()` \u003cbr\u003e\n`@Instanceof()` \u003cbr\u003e\n`@Typeof()` \u003cbr\u003e\n`@Extend()` \u003cbr\u003e\n`@Before()` \u003cbr\u003e\n`@After()` \u003cbr\u003e\n`@Util()` \u003cbr\u003e\n`@BeforeEach()` \u003cbr\u003e\n`@AfterEach()` \u003cbr\u003e\nmore coming soon. \u003cbr\u003e\ndetailed examples in example/tests folder... \u003cbr\u003e\ncontinue reading to know more...\n\n## @Before() and @After()\n\n```typescript\nimport { Suite, Before, After, Equal } from \"oral\";\n@Suite()\nexport class beforeAfterTest {\n  name: string;\n  @Before()\n  before() {\n    this.name = \"a name\";\n    // create connection\n  }\n\n  @Equal(\"a name\")\n  shouldReturnName() {\n    return this.name;\n  }\n\n  @After()\n  after() {\n    this.name = undefied;\n    // drop database\n  }\n}\n```\n\n## @Util()\n\n```typescript\nimport { Util, Suit, GreaterThan } from \"oral\";\n@Suite()\nexport class utilTest {\n  @Util()\n  @GreaterThan(5)\n  aUtil(num1: number, num2: number) {\n    return num1 + num2;\n  }\n\n  realTest() {\n    this.aUtil();\n  }\n}\n```\n\n## beforeEveryone \u0026 afterEveryone\n\ndo not support in new version currenly, available soon !!! `git checkout old` to use this\n\n- `oral.config.ts`\n\n```typescript\nfunction Afunc() {\n  // create database\n  return \"a global string\";\n}\nmodule.export = {\n  beforeEveryone: Afunc,\n};\n```\n\n- aTest.test.ts\n\n```typescript\nimport { Suite, Equal } from \"oral\";\n@Suite()\nexport class aTest {\n  str: string;\n  constructure(str: string) {\n    this.str = str; // aFunc's returned value\n  }\n\n  @Equal()\n  checkIfStrExist() {\n    return this.str;\n  }\n}\n```\n\n## @Extend()\n\n```typescript\nimport { Extend, Suite } from \"oral\";\n\nconst decoratorFunc = (val: string) =\u003e {\n  if (val === \"a string\") return true;\n  return false;\n};\n\n@Suite()\nexport class extendDecoratorTest {\n  @Extend(\"my own decorator\", decoratorFunc)\n  extendDecoratorTesting() {\n    return \"a string\";\n  }\n\n  @Extend(\"my own decorator\", decoratorFunc)\n  extendDecoratorTestingFail() {\n    return \"a false string\";\n  }\n}\n```\n\n## @BeforeEach() \u0026 @AfterEach()\n\n```typescript\nimport { Suite, Equal, BeforeEach, AfterEach } from \"oral\";\n\n@Suite()\nexport class beforeEveryone {\n  num = 0;\n  @BeforeEach()\n  beforeEach() {\n    this.num = this.num + 1;\n  }\n  @AfterEach()\n  beforeEach() {\n    this.num = 0;\n  }\n  @Equal(1)\n  checkIfEqualOne() {\n    return this.num;\n  }\n\n  @Equal(1)\n  checkIfEqualOneAgain() {\n    return this.num;\n  }\n}\n```\n\n## philosophy\n\nHello i am tanay pingalkar. I like to code things that helps other and are open and free. I have created this testing framework for using the power of decorators and to give testers a complete new exciting workflow. This framework is typescript specific and dedicated to it. This framework believe that every assertion counts the quality of software and thats why every method in a class is a assertion. I currently dont have a good name but I call it \"oral\" (@ral) for some reason. Suggestion for name is needed. This project is open source and Licensed under [MIT License](https://github.com/tanay-pingalkar/oral/blob/main/LICENSE). I will like to see feedback and ideas on github issues to make it better.\n\n## contribution\n\nthis porject is open source and will always live open source. Contributer's are highly welcome and appreciated. You can read [CONTRIBUTING.md](https://github.com/tanay-pingalkar/oral/blob/main/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/tanay-pingalkar/oral/blob/main/CODE_OF_CONDUCT.md)\nto know more about contribution process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanay-pingalkar%2Foral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanay-pingalkar%2Foral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanay-pingalkar%2Foral/lists"}