{"id":15060638,"url":"https://github.com/thecodersstudio/node-native-test-runner","last_synced_at":"2026-02-05T16:31:16.753Z","repository":{"id":250167430,"uuid":"833602972","full_name":"TheCodersStudio/node-native-test-runner","owner":"TheCodersStudio","description":"Code samples and test cases showcasing the power of Node.js's native test runner for streamlined and efficient testing.","archived":false,"fork":false,"pushed_at":"2024-07-26T16:10:10.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-22T13:52:19.725Z","etag":null,"topics":["bigquery","mock","nodejs","nodejs-test","nodenativetestrunner","test"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheCodersStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-25T11:32:33.000Z","updated_at":"2024-07-27T09:19:29.000Z","dependencies_parsed_at":"2024-07-28T16:12:23.469Z","dependency_job_id":null,"html_url":"https://github.com/TheCodersStudio/node-native-test-runner","commit_stats":null,"previous_names":["devinsightlab/node-native-test-runner","thecodersstudio/node-native-test-runner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodersStudio%2Fnode-native-test-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodersStudio%2Fnode-native-test-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodersStudio%2Fnode-native-test-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCodersStudio%2Fnode-native-test-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheCodersStudio","download_url":"https://codeload.github.com/TheCodersStudio/node-native-test-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809888,"owners_count":20351407,"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":["bigquery","mock","nodejs","nodejs-test","nodenativetestrunner","test"],"created_at":"2024-09-24T23:01:48.269Z","updated_at":"2026-02-05T16:31:16.697Z","avatar_url":"https://github.com/TheCodersStudio.png","language":"JavaScript","readme":"# Node.js Native Test Runner Examples\n\nWelcome to the **Node Native Test Runner** repository! This project contains code samples and unit tests utilizing Node.js's native test runner.\n\nThis repository serves as a practical guide for developers looking to leverage Node.js's built-in testing capabilities. Here, you'll find examples that demonstrate efficient testing practices, focusing on simplicity and integration.\n\n## About Node.js Native Test Runner\n\nNode.js version 18 (and later) includes a powerful, built-in test runner that simplifies the testing process.  It offers features like:\n\n- **Test Suites (`describe`)** \n- **Test Cases (`it` or `test`)** \n- **Assertions (`assert`)** \n- **Mocking (`mock`)**\n- **Subtests**\n- **Reporters** \n\n...and more! This means you can write robust tests without relying on external testing frameworks.\n\n## Examples\n\nThis repository provides code samples that demonstrate:\n\n- **Basic Test Setup:** How to structure your test files and use the core features of `node:test`.\n- **Mocking Dependencies:** Techniques for isolating your code and simulating external dependencies using the built-in `mock` module.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 20 or later\n- [`Yarn`](https://yarnpkg.com/getting-started/install) \n\n### Installation\n\n1. **Clone the Repository:**\n   \n    ```sh\n    git clone https://github.com/DevInsightLab/node-native-test-runner.git\n    ```\n\n2. **Navigate to the project directory**\n   \n    ```sh\n    cd node-native-test-runner\n    ```\n\n3. **Install dependencies**\n   \n    ```sh\n    yarn install\n    ```\n\nBrowse the different examples to see how `node:test` is used in various scenarios.\n\n### Running Tests\n\n- Execute the following command to run the tests:\n\n  ```sh\n  yarn test\n  ```\n- Run tests with coverage\n\n  ```sh\n  yarn run test:cov\n  ```\n\n## Blog Post\n\nCheck out our blog post for a detailed explanation of the examples in this repository. It provides insights and additional context to help you get the most out of these resources.\n\n- [medium.com](https://chetan07.medium.com/level-up-your-node-js-testing-with-native-test-runner-and-mocks-a-bigquery-example-1ac4b5aca0b2)\n- [dev.to](https://dev.to/chetanppatil/level-up-your-nodejs-testing-with-native-test-runner-and-mocks-a-bigquery-example-n7a)\n\n## Contributing\n\nContributions are welcome! If you have an example that demonstrates a specific testing concept or best practice using Node.js's native test runner, feel free to open a pull request.\n\n## Contact\n\nFor questions or suggestions, please open an issue or contact us directly.\n\n## Support\n\n💙 If you find this project helpful, please give it a ⭐ and share it with others!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodersstudio%2Fnode-native-test-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodersstudio%2Fnode-native-test-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodersstudio%2Fnode-native-test-runner/lists"}