Skip to content

Commit

Permalink
Merge pull request #24 from Samuellyworld/main
Browse files Browse the repository at this point in the history
Tests on Voting Dapp πŸ•΅πŸ»β€β™‚οΈ
  • Loading branch information
ChoiceCoin committed Feb 3, 2022
2 parents de76966 + bd17248 commit 6a791ed
Show file tree
Hide file tree
Showing 55 changed files with 51,409 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Tests/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Choice Coin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions Tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

# Tests On Voting_DApp

* each folder have its ` __snapshots__` results, which is a form of a results after running `test` command.
* `setUpTests.js` has the configuration and the enzyme-adapter enviornment before running.

## Technology Used

* Jest
* Enzyme
* Enzyme-Adapter
* axios mock adapter

## Run Tests on Local Machine

## Requirements

* NPM and Node installed, download [HERE](https://phoenixnap.com/kb/install-node-js-npm-on-windows)


* git clone the repository

```
$ git clone https://github.com/ChoiceCoin/Voting_DApp.git
```
* go into the `Tests` directory

```
$ cd Tests
```
* install voting Dapp dependencies with

```
$ npm install
```

* Run Test suites with

```
$ npm test
```
this will run the tests and generate a snapshots, if not already generated when installed in the code directory

* Preview

![image](https://gateway.pinata.cloud/ipfs/QmQia7vpk4BAXMowXfGR7g52MTPqdK6gviEGT2JtUt62PK?preview=1)

* Failed Tests suite

![image](https://gateway.pinata.cloud/ipfs/QmSf4Phk7mJs2e1t6BJ7tppbZuKgiyaB8zmSLvionWP9o2?preview=1)

* Test Coverage with

```
$ npm test -- --coverage
```

this will generate a total tests coverage folder after the command in the code directory

![image](https://gateway.pinata.cloud/ipfs/QmVTw89xDoBRdCoMdqxWgMcm8EkMZUCTUth3V3cohdktfe?preview=1)

## License

[License]()

0 comments on commit 6a791ed

Please sign in to comment.