Skip to content

Commit

Permalink
Merge pull request #47 from swrlab/dev/unit-tests-update
Browse files Browse the repository at this point in the history
Dev/unit tests update
  • Loading branch information
frytg authored Mar 23, 2021
2 parents 5bdb9e1 + d49f903 commit 18fa1df
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 57 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"ecmaVersion": 2020
},
"root": true,
"plugins": ["@swrlab/eslint-plugin-swr"],
"extends": ["plugin:@swrlab/eslint-plugin-swr/recommended"],
"plugins": ["@swrlab/eslint-plugin-swr", "chai-friendly"],
"extends": ["plugin:@swrlab/eslint-plugin-swr/recommended", "plugin:chai-friendly/recommended"],
"ignorePatterns": ["docs/_SIDEBAR.md"],
"rules": {
"radix": 0,
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "next"
"argsIgnorePattern": "next",
"varsIgnorePattern": "should"
}
],
"no-param-reassign": [2, { "props": false }],
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.7] - 2021-03-18

### Changes

- Add auth verification for unit tests
- Check `content-type` in unit tests
- Update unit tests for new ESLint config

## [0.1.6] - 2021-03-17

### Changes
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ This source code is provided under EUPL v1.2, except for the [`spdx-exceptions`]
| NPM DEV | `docsify-cli` | [MIT](https://github.com/docsifyjs/docsify-cli/blob/master/LICENSE) |
| NPM DEV | `eslint` | [MIT](https://github.com/eslint/eslint/blob/master/LICENSE) |
| NPM DEV | `eslint-plugin-swr` | [ISC](https://github.com/swrlab/eslint-plugin-swr/blob/main/package.json) |
| NPM DEV | `eslint-plugin-chai-friendly` | [MIT](https://github.com/ihordiachenko/eslint-plugin-chai-friendly/blob/master/LICENSE) |
| NPM DEV | `license-compliance` | [MIT](https://github.com/tmorell/license-compliance/blob/master/LICENSE) |
| NPM DEV | `mocha` | [MIT](https://github.com/mochajs/mocha/blob/master/LICENSE) |
| NPM DEV | `nodemon` | [MIT](https://github.com/remy/nodemon/blob/master/LICENSE) |
Expand Down
2 changes: 1 addition & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "European Union Public License 1.2",
"url": "https://spdx.org/licenses/EUPL-1.2.html"
},
"version": "0.1.6"
"version": "0.1.7"
},
"externalDocs": {
"description": "ARD-Eventhub Documentation",
Expand Down
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ info:
license:
name: European Union Public License 1.2
url: 'https://spdx.org/licenses/EUPL-1.2.html'
version: 0.1.6
version: 0.1.7
externalDocs:
description: ARD-Eventhub Documentation
url: 'https://swrlab.github.io/ard-eventhub/'
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ard-eventhub",
"version": "0.1.6",
"version": "0.1.7",
"description": "ARD system to distribute real-time (live) metadata for primarily radio broadcasts.",
"main": "./src/ingest/index.js",
"scripts": {
Expand Down Expand Up @@ -41,6 +41,7 @@
"chai-http": "^4.3.0",
"docsify-cli": "^4.4.3",
"eslint": "^7.22.0",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-swr": "0.0.5",
"license-compliance": "^1.0.3",
"mocha": "^8.3.2",
Expand Down
1 change: 1 addition & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ It needs several environment variables to work:
- OPTIONAL `PORT` - override server port setting, default is 8080
- REQUIRED `TEST_USER` - test user email
- REQUIRED `TEST_USER_PW` - test user password
- OPTIONAL `TEST_USER_RESET` - test email reset (request limit)

## Setup

Expand Down
5 changes: 4 additions & 1 deletion test/example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
*/

const expect = require('chai').expect
// Add eslint exceptions for chai
/* global describe it */

const { expect } = require('chai')

describe('Simple Math Test', () => {
it('1 + 1 = 2', () => {
Expand Down
Loading

0 comments on commit 18fa1df

Please sign in to comment.