Skip to content

Commit

Permalink
refactor(macos/scan): split into several files to simplify tests
Browse files Browse the repository at this point in the history
- split the function to scan networks on macos to simplify tests.
- add a command `npm run test`
  • Loading branch information
friedrith committed Jul 3, 2020
1 parent 39eceec commit 9727188
Show file tree
Hide file tree
Showing 14 changed files with 7,999 additions and 1,769 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"parser": "babel-eslint",
"extends": ["prettier", "eslint:recommended", "plugin:node/recommended"]
"extends": ["prettier", "eslint:recommended", "plugin:node/recommended"],
"plugins": ["jest"],
"env": {
"jest/globals": true
}
}
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Please consider these guidelines when filing a pull request:
- Follow the [Coding Rules](#coding-rules)
- Follow the [Commit Rules](#commit-rules)
- Make sure you rebased the current master branch when filing the pull request
- Follow [Test guidelines](#tests)
- Squash your commits when filing the pull request
- Provide a short title with a maximum of 100 characters
- Provide a more detailed description containing
Expand All @@ -43,7 +44,10 @@ To keep the code base of commitlint neat and tidy the following rules apply to e
- Favor micro library over swiss army knives (rimraf, ncp vs. fs-extra)
- Be awesome

> use commands `npm run eslint` and `npm run prettier:check` to be sure your code respect coding rules.
> use commands `npm run eslint` and `npm run format` to be sure your code
> respect coding rules.
> You can also use `npm run format:fix` to fix prettier errors
## Commit Rules

Expand All @@ -70,6 +74,15 @@ These are the authorized types:
- style
- test

## Test

If you add a feature or fix a bug, you need to provide a test verifying your
improvement. You can launch tests using `npm run test`.

If you fix a bug related to a parser, please provide a log of a command standard
output. For example for a scan, use `node test/scan.js > file.log` to generate a
log file.

## Versioning

`node-wifi` use [standard-version](https://github.com/conventional-changelog/standard-version) to handle versioning
Expand Down

0 comments on commit 9727188

Please sign in to comment.