Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests #76

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
"env": {
"es6": true,
"commonjs": true,
"es2021": true
},
"plugins": [
"ava"
],
"extends": [
"eslint:recommended",
"plugin:ava/recommended"
],
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
}
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ build
node_modules

/.idea
test/credentials.js
.DS_Store
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/netatmo.js"
},
{
"type": "node",
"request": "launch",
"name": "Debug AVA test file",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava",
"runtimeArgs": [
"--serial",
"${file}"
],
"outputCapture": "std",
"skipFiles": [
"<node_internals>/**/*.js"
]
}
]
}
6 changes: 6 additions & 0 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
files: [
"test/**/*",
"!test/credentials.js"
]
};
Loading