All Projects β†’ okunokentaro β†’ ngx-testbedder

okunokentaro / ngx-testbedder

Licence: MIT license
CLI tool for writing the test bed for Angular integration test

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ngx-testbedder

api-test
🌿 A simple bash script to test JSON API from terminal in a structured and organized way.
Stars: ✭ 53 (+307.69%)
Mutual labels:  test, integration-testing
Cli Prompts Test
Write e2e tests for CLI apps with ease
Stars: ✭ 17 (+30.77%)
Mutual labels:  test, integration-testing
Venom
🐍 Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions
Stars: ✭ 384 (+2853.85%)
Mutual labels:  test, integration-testing
Gest
πŸ‘¨β€πŸ’» A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud
Stars: ✭ 109 (+738.46%)
Mutual labels:  test, integration-testing
Smocker
Smocker is a simple and efficient HTTP mock server and proxy.
Stars: ✭ 465 (+3476.92%)
Mutual labels:  test, integration-testing
Javascript Testing Best Practices
πŸ“—πŸŒ 🚒 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+107407.69%)
Mutual labels:  test, integration-testing
assert
Go 语言 assert 断言函数
Stars: ✭ 17 (+30.77%)
Mutual labels:  test
actix sqlx mysql user crud
A user crud written in Rust, designed to connect to a MySQL database with full integration test coverage.
Stars: ✭ 78 (+500%)
Mutual labels:  integration-testing
phoenix.webui.framework
基于WebDriverηš„WebUIθ‡ͺεŠ¨εŒ–ζ΅‹θ―•ζ‘†ζžΆ
Stars: ✭ 118 (+807.69%)
Mutual labels:  test
showcase
A Full Stack Journey with Micro Services and Micro Front Ends. Using dapr, kubernetes, react module federation and web assembly,
Stars: ✭ 45 (+246.15%)
Mutual labels:  integration-testing
pest-plugin-laravel-octane
β›½ Pest plugin to test Laravel applications powered by Octane.
Stars: ✭ 21 (+61.54%)
Mutual labels:  test
raise if
one liner `raise Exception if condition` for Python
Stars: ✭ 15 (+15.38%)
Mutual labels:  test
r spec-clone.rb
A minimalist RSpec clone with all the essentials.
Stars: ✭ 38 (+192.31%)
Mutual labels:  test
J1939-Framework
Framework to work with J1939 Frames used in CAN bus in bus, car and trucks industries
Stars: ✭ 123 (+846.15%)
Mutual labels:  test
awesome-testing
Software Testing for QA.
Stars: ✭ 48 (+269.23%)
Mutual labels:  test
Jive.jl
some useful steps in tests πŸ‘£
Stars: ✭ 41 (+215.38%)
Mutual labels:  test
cypress-maildev
Cypress Maildev is a bunch of Cypress commands in order to test your messages (SMS and Emails) by using Maildev REST API.
Stars: ✭ 19 (+46.15%)
Mutual labels:  test
seaworthy
Test harness for Docker container images 🌊 🚒
Stars: ✭ 29 (+123.08%)
Mutual labels:  integration-testing
octane-testbench
β›½ Set of utilities to test Laravel applications powered by Octane.
Stars: ✭ 35 (+169.23%)
Mutual labels:  test
html-comment-regex
Regular expression for matching HTML comments
Stars: ✭ 15 (+15.38%)
Mutual labels:  test

ngx-testbedder

ngx-testbedder helps you to write the TestBed for an Angular (2.0+) application.

It displays a tree based on dependencies of a given file to this command. In addition, as you write integration tests in an Angular applications you can select the real modules and mock modules to use for testing. Then, the import statement necessary for that purpose and providers for a test bed are generated and output on the screen.

Demo

demo

? Which module do you use as real? (Press <space> to select, <a> to toggle all, <i> to inverse selection)
❯◯ Done
 β—‰ DetailComponent
 β—― β”œβ”€β”€ AppActionsService
 β—― β”œβ”€β”€ AppDispatcherService
 β—― β”œβ”€β”€ AppStoreService
 β—― β”œβ”€β”€ ProjectsActionsService
 β—― └── ProjectsStoreService

The prompt displays a checkable dependency tree.

  • Checked
    • We will use the real module in the test.
  • Unchecked
    • We will replace it with a mock module in the test.

If you press the Enter key without checking Done, the tree will be updated with other modules that the real module depends on.

To complete, check Done and press the Enter key. Then, the result will be output.

Installation

You can install ngx-testbedder command using npm.

$ npm install --global ngx-testbedder

# or to local

$ npm install --save-dev ngx-testbedder

Requirements:

  • Node.js 6.9.0+
  • npm 3.0.0+

Usage

$ testbedder ./src/app/app.component.ts

# or if you installed to local

$ $(npm bin)/testbedder ./src/app/app.component.ts

API

testbedder

$ testbedder [TypeScript file path] [Options]

Options

--tsconfig

Alias: -c

  • You can specify a file path of tsconfig.json.
  • As default, it will look for ./tsconfig.json. If not found, search inside ./src/tsconfig.json.

--verbose

Alias: -v

  • It prints debug log verbose.
  • Default is false

--tree

Alias: -t

  • It displays only a tree.
  • The prompt is not displayed.
  • Default is false

--pattern

Alias: --pt

  • You can specify a pattern to name mock file.
    • angular-cli recommends foo-bar.spec.ts as name the spec file.
    • Similarly, we propose the name foo-bar.mock.ts to the mock file.
    • Please change this naming convention within the scope of the regular expression if you want.
  • Default is (.*)\.ts

--replacement

Alias: --rp

  • You can specify the replacement result for the above --pattern.
  • Default is $1.mock.ts

--help

  • It shows help.

--version

  • It shows the version.

Contributions

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT Β© OKUNOKENTARO

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].