diff --git a/.travis.yml b/.travis.yml index 1ba948597..b434a855d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,13 @@ node_js: cache: directories: - - "node_modules" - - "$HOME/.sonar/cache" + - ~/.npm + - node_modules + - ~/.sonar/cache addons: sonarcloud: - organization: "javierbrea" - token: - secure: "$SONAR_TOKEN" + organization: "mocks-server" branch: name: "$TRAVIS_CURRENT_BRANCH" @@ -20,11 +19,11 @@ script: - npm run lint - npm run test-ci - npm run coveralls - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then sonar-scanner; fi' + - sonar-scanner -Dsonar.login=${SONAR_TOKEN} deploy: provider: npm - email: "devops@xbyorange.com" + email: "javier.brea@gmail.com" api_key: "$NPM_TOKEN" on: tags: true diff --git a/CHANGELOG.md b/CHANGELOG.md index e247ca58b..e525925c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed ### Removed +## [1.0.2] - 2019-11-08 +### Changed +- Project forked from xbyorange/mocks-server. Fixed license. Read NOTICE for further details + +### Fixed +- Fix some minor Sonar bugs and code smells. + ## [1.0.1] - 2019-06-04 ### Fixed - Upgrade dependencies to fix potential security vulnerability diff --git a/LICENSE b/LICENSE index 261eeb9e9..58a0db862 100644 --- a/LICENSE +++ b/LICENSE @@ -175,27 +175,5 @@ END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Copyright 2019 Javier Brea and contributors + Copyright 2019 XbyOrange diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..7ca6ecdd3 --- /dev/null +++ b/NOTICE @@ -0,0 +1,6 @@ +mocks-server. Main distribution +Copyright 2019 Javier Brea + +Portions of this software were developed at XbyOrange company. + XByOrange npm-file-link v1.0.1, distributed under The Apache Software License, Version 2.0. + Github repository "xbyorange/mocks-server" (https://github.com/XbyOrange/mocks-server), branch master, commit 961ca6702569091ed863679a8e675788c6f4fded. The original project files were wrongly licensed because an error of the main maintainer, Javier Brea, who received instructions from the XbyOrange company about licensing it as Apache2.0, but didn't include the appropiate license header in all repository files by error. The error has been fixed and license headers has been added to all original files, as it was the real intention of the XbyOrange company. diff --git a/bin/mocks-server b/bin/mocks-server index 40ef927c5..95c063c15 100755 --- a/bin/mocks-server +++ b/bin/mocks-server @@ -2,3 +2,13 @@ "use strict"; require("../lib/start").start(); + +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ diff --git a/index.js b/index.js index d02f5959d..2b35dfbc1 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const Cli = require("./lib/Cli"); diff --git a/lib/Cli.js b/lib/Cli.js index 62ec24d0e..48553d658 100644 --- a/lib/Cli.js +++ b/lib/Cli.js @@ -1,3 +1,14 @@ +/* +Copyright 2019 Javier Brea +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const chalk = require("chalk"); @@ -132,7 +143,9 @@ class Cli { if (!input || !input.length) { return Promise.resolve(featuresNames); } - return Promise.resolve(featuresNames.filter(feature => feature.includes(input))); + return Promise.resolve( + featuresNames.filter(currentFeature => currentFeature.includes(input)) + ); } }); this._features.current = feature; diff --git a/lib/Server.js b/lib/Server.js index c924bd668..256741fc5 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const path = require("path"); diff --git a/lib/Settings.js b/lib/Settings.js index 375a5888d..555182d8b 100644 --- a/lib/Settings.js +++ b/lib/Settings.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; class Settings { diff --git a/lib/api/Api.js b/lib/api/Api.js index 242253375..dcc768cda 100644 --- a/lib/api/Api.js +++ b/lib/api/Api.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const express = require("express"); diff --git a/lib/api/Features.js b/lib/api/Features.js index 943e6b02a..28bd8b234 100644 --- a/lib/api/Features.js +++ b/lib/api/Features.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const express = require("express"); diff --git a/lib/api/Settings.js b/lib/api/Settings.js index d4296577c..71fa3c3e0 100644 --- a/lib/api/Settings.js +++ b/lib/api/Settings.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const express = require("express"); diff --git a/lib/base-cli/Inquirer.js b/lib/base-cli/Inquirer.js index f2a64a195..9977556af 100644 --- a/lib/base-cli/Inquirer.js +++ b/lib/base-cli/Inquirer.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const chalk = require("chalk"); diff --git a/lib/base-cli/index.js b/lib/base-cli/index.js index ff842bf6e..3873c1cad 100644 --- a/lib/base-cli/index.js +++ b/lib/base-cli/index.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const { Inquirer } = require("./Inquirer"); diff --git a/lib/common/constants.js b/lib/common/constants.js index 5f02d119b..f777aeda8 100644 --- a/lib/common/constants.js +++ b/lib/common/constants.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + module.exports = { FUNCTION_TYPE: "function", WATCH_RELOAD: "watch-reload" diff --git a/lib/common/helpers.js b/lib/common/helpers.js index c983574fc..5faced066 100644 --- a/lib/common/helpers.js +++ b/lib/common/helpers.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const stringToBoolean = val => { diff --git a/lib/common/options.js b/lib/common/options.js index ca3c62dcd..b8159d8f7 100644 --- a/lib/common/options.js +++ b/lib/common/options.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const commander = require("commander"); diff --git a/lib/common/tracer.js b/lib/common/tracer.js index 305b64319..c604c7863 100644 --- a/lib/common/tracer.js +++ b/lib/common/tracer.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const winston = require("winston"); diff --git a/lib/features/Feature.js b/lib/features/Feature.js index e14d6883c..7d0026341 100644 --- a/lib/features/Feature.js +++ b/lib/features/Feature.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const { cloneDeep, map, sum } = require("lodash"); diff --git a/lib/features/Features.js b/lib/features/Features.js index 9132ae425..71bd3bcc3 100644 --- a/lib/features/Features.js +++ b/lib/features/Features.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const Boom = require("boom"); diff --git a/lib/middlewares.js b/lib/middlewares.js index a5483c10e..06f3acf36 100644 --- a/lib/middlewares.js +++ b/lib/middlewares.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const bodyParser = require("body-parser"); diff --git a/lib/start.js b/lib/start.js index 694bd56af..68ed30c05 100644 --- a/lib/start.js +++ b/lib/start.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const Boom = require("boom"); diff --git a/package-lock.json b/package-lock.json index bfd215839..a845e2ae7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@xbyorange/mocks-server", - "version": "1.0.1", + "name": "@mocks-server/main", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3db7da205..27ed902c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@xbyorange/mocks-server", - "version": "1.0.1", + "name": "@mocks-server/main", + "version": "1.0.2", "description": "Mocks server with extensible fixtures groupables in predefined behaviors. Behavior can be changed using CLI or REST API", "keywords": [ "mocks", @@ -14,9 +14,9 @@ "testing", "development" ], - "author": "XByOrange", + "author": "Javier Brea", "license": "Apache-2.0", - "repository": "https://github.com/XbyOrange/mocks-server", + "repository": "https://github.com/mocks-server/main", "publishConfig": { "access": "public" }, diff --git a/sonar-project.properties b/sonar-project.properties index 937184641..1c534e4af 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,11 +1,16 @@ -sonar.organization=javierbrea -sonar.projectKey=xbyorange-mocks-server -sonar.projectVersion=1.0.1 +sonar.organization=mocks-server +sonar.projectKey=mocks-server-main +sonar.projectVersion=1.0.2 -sonar.sources=lib,test -sonar.exclusions=node_modules/** +sonar.javascript.file.suffixes=.js +sonar.sourceEncoding=UTF-8 +sonar.exclusions=node_modules/**,*.config.js sonar.test.exclusions=test/**/* sonar.coverage.exclusions=test/**/* sonar.cpd.exclusions=test/** sonar.javascript.lcov.reportPaths=coverage/lcov.info sonar.host.url=https://sonarcloud.io + +sonar.issue.ignore.multicriteria=j1 +sonar.issue.ignore.multicriteria.j1.ruleKey=javascript:S4144 +sonar.issue.ignore.multicriteria.j1.resourceKey=test/**/* diff --git a/test/acceptance/cli/autocomplete.spec.js b/test/acceptance/cli/autocomplete.spec.js index 4a3ed1205..947293ac7 100644 --- a/test/acceptance/cli/autocomplete.spec.js +++ b/test/acceptance/cli/autocomplete.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../../utils"); diff --git a/test/acceptance/cli/custom-quit.spec.js b/test/acceptance/cli/custom-quit.spec.js index 4cb520cd9..6c0ad2336 100644 --- a/test/acceptance/cli/custom-quit.spec.js +++ b/test/acceptance/cli/custom-quit.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../../utils"); diff --git a/test/acceptance/cli/exit-logs-mode.spec.js b/test/acceptance/cli/exit-logs-mode.spec.js index f12f300ce..7998ed734 100644 --- a/test/acceptance/cli/exit-logs-mode.spec.js +++ b/test/acceptance/cli/exit-logs-mode.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../../utils"); diff --git a/test/acceptance/cli/fixtures/autocomplete.js b/test/acceptance/cli/fixtures/autocomplete.js index 894017811..cf70e33e9 100644 --- a/test/acceptance/cli/fixtures/autocomplete.js +++ b/test/acceptance/cli/fixtures/autocomplete.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const baseCli = require("../../../../lib/base-cli"); const questions = { diff --git a/test/acceptance/cli/fixtures/custom-quit-method.js b/test/acceptance/cli/fixtures/custom-quit-method.js index fd6efc1b4..4cb9352d5 100644 --- a/test/acceptance/cli/fixtures/custom-quit-method.js +++ b/test/acceptance/cli/fixtures/custom-quit-method.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const baseCli = require("../../../../lib/base-cli"); const questions = { diff --git a/test/acceptance/cli/fixtures/exit-logs-mode.js b/test/acceptance/cli/fixtures/exit-logs-mode.js index e93986d4a..9db37b80a 100644 --- a/test/acceptance/cli/fixtures/exit-logs-mode.js +++ b/test/acceptance/cli/fixtures/exit-logs-mode.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const baseCli = require("../../../../lib/base-cli"); const questions = { diff --git a/test/acceptance/cli/fixtures/logs-mode.js b/test/acceptance/cli/fixtures/logs-mode.js index 92a479539..0d855ce26 100644 --- a/test/acceptance/cli/fixtures/logs-mode.js +++ b/test/acceptance/cli/fixtures/logs-mode.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const baseCli = require("../../../../lib/base-cli"); const questions = { diff --git a/test/acceptance/cli/fixtures/readme-example.js b/test/acceptance/cli/fixtures/readme-example.js index 38fafb87e..0b3bb4daa 100644 --- a/test/acceptance/cli/fixtures/readme-example.js +++ b/test/acceptance/cli/fixtures/readme-example.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const baseCli = require("../../../../lib/base-cli"); const questions = { diff --git a/test/acceptance/cli/fixtures/remove-listeners.js b/test/acceptance/cli/fixtures/remove-listeners.js index bc9163cc9..c6a56b1df 100644 --- a/test/acceptance/cli/fixtures/remove-listeners.js +++ b/test/acceptance/cli/fixtures/remove-listeners.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const baseCli = require("../../../../lib/base-cli"); const questions = { diff --git a/test/acceptance/cli/logs-mode.spec.js b/test/acceptance/cli/logs-mode.spec.js index 020bd1fd3..963c427ae 100644 --- a/test/acceptance/cli/logs-mode.spec.js +++ b/test/acceptance/cli/logs-mode.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../../utils"); diff --git a/test/acceptance/cli/readme-example.spec.js b/test/acceptance/cli/readme-example.spec.js index 7924370e2..e8b138bf8 100644 --- a/test/acceptance/cli/readme-example.spec.js +++ b/test/acceptance/cli/readme-example.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../../utils"); diff --git a/test/acceptance/cli/remove-listeners.spec.js b/test/acceptance/cli/remove-listeners.spec.js index 013b4a14b..4a91a19e5 100644 --- a/test/acceptance/cli/remove-listeners.spec.js +++ b/test/acceptance/cli/remove-listeners.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../../utils"); diff --git a/test/acceptance/mocks-server-bin.spec.js b/test/acceptance/mocks-server-bin.spec.js index c061ab3bc..a95d7204c 100644 --- a/test/acceptance/mocks-server-bin.spec.js +++ b/test/acceptance/mocks-server-bin.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const { CliRunner } = require("../utils"); diff --git a/test/unit/api/Api.mocks.js b/test/unit/api/Api.mocks.js index 119343b0f..eea29cf36 100644 --- a/test/unit/api/Api.mocks.js +++ b/test/unit/api/Api.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/api/Api"); diff --git a/test/unit/api/Api.spec.js b/test/unit/api/Api.spec.js index 227909737..7c892addc 100644 --- a/test/unit/api/Api.spec.js +++ b/test/unit/api/Api.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const express = require("express"); const sinon = require("sinon"); diff --git a/test/unit/api/Features.mocks.js b/test/unit/api/Features.mocks.js index 140607f7a..fd5e8c13a 100644 --- a/test/unit/api/Features.mocks.js +++ b/test/unit/api/Features.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/api/Features"); diff --git a/test/unit/api/Features.spec.js b/test/unit/api/Features.spec.js index f5870caec..9c5786204 100644 --- a/test/unit/api/Features.spec.js +++ b/test/unit/api/Features.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const express = require("express"); const sinon = require("sinon"); diff --git a/test/unit/api/Settings.mocks.js b/test/unit/api/Settings.mocks.js index 288cf4a35..2a6ba9656 100644 --- a/test/unit/api/Settings.mocks.js +++ b/test/unit/api/Settings.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/api/Settings"); diff --git a/test/unit/api/Settings.spec.js b/test/unit/api/Settings.spec.js index 4680064d5..56d1f7513 100644 --- a/test/unit/api/Settings.spec.js +++ b/test/unit/api/Settings.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const express = require("express"); const sinon = require("sinon"); diff --git a/test/unit/cli/Inquirer.spec.js b/test/unit/cli/Inquirer.spec.js index 34de9b264..2853c7e64 100644 --- a/test/unit/cli/Inquirer.spec.js +++ b/test/unit/cli/Inquirer.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const inquirer = require("inquirer"); const sinon = require("sinon"); const chalk = require("chalk"); diff --git a/test/unit/common/Libs.mocks.js b/test/unit/common/Libs.mocks.js index d8299b4c3..3a18faf71 100644 --- a/test/unit/common/Libs.mocks.js +++ b/test/unit/common/Libs.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const http = require("http"); diff --git a/test/unit/common/options.spec.js b/test/unit/common/options.spec.js index 3bf211dac..ea16c238b 100644 --- a/test/unit/common/options.spec.js +++ b/test/unit/common/options.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const commander = require("commander"); diff --git a/test/unit/common/tracer.spec.js b/test/unit/common/tracer.spec.js index 353db46be..eba455542 100644 --- a/test/unit/common/tracer.spec.js +++ b/test/unit/common/tracer.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const tracer = require("../../../lib/common/tracer"); diff --git a/test/unit/features/Feature.spec.js b/test/unit/features/Feature.spec.js index 06f77c4ca..e810f7ee3 100644 --- a/test/unit/features/Feature.spec.js +++ b/test/unit/features/Feature.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + jest.mock("route-parser"); const routeParser = require("route-parser"); diff --git a/test/unit/features/Features.mocks.js b/test/unit/features/Features.mocks.js index ee21b4725..a8a567377 100644 --- a/test/unit/features/Features.mocks.js +++ b/test/unit/features/Features.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/features/Features"); diff --git a/test/unit/features/Features.spec.js b/test/unit/features/Features.spec.js index 1108b51d3..e405c46b6 100644 --- a/test/unit/features/Features.spec.js +++ b/test/unit/features/Features.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const Boom = require("boom"); const { cloneDeep } = require("lodash"); diff --git a/test/unit/index.spec.js b/test/unit/index.spec.js index 1ed27ff80..5e0d997ef 100644 --- a/test/unit/index.spec.js +++ b/test/unit/index.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const index = require("../../index"); describe("index", () => { diff --git a/test/unit/lib/BaseCli.mocks.js b/test/unit/lib/BaseCli.mocks.js index 7e7291928..26f957749 100644 --- a/test/unit/lib/BaseCli.mocks.js +++ b/test/unit/lib/BaseCli.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const cliBase = require("../../../lib/base-cli"); diff --git a/test/unit/lib/Cli.mocks.js b/test/unit/lib/Cli.mocks.js index 23d51617c..687b0fcbd 100644 --- a/test/unit/lib/Cli.mocks.js +++ b/test/unit/lib/Cli.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/Cli"); diff --git a/test/unit/lib/Cli.spec.js b/test/unit/lib/Cli.spec.js index 9da185d43..add4830ee 100644 --- a/test/unit/lib/Cli.spec.js +++ b/test/unit/lib/Cli.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const ServerMocks = require("./Server.mocks.js"); diff --git a/test/unit/lib/Server.mocks.js b/test/unit/lib/Server.mocks.js index 8f410ac3c..ddca55b98 100644 --- a/test/unit/lib/Server.mocks.js +++ b/test/unit/lib/Server.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/Server"); diff --git a/test/unit/lib/Server.spec.js b/test/unit/lib/Server.spec.js index 36cead4d6..a3f780a78 100644 --- a/test/unit/lib/Server.spec.js +++ b/test/unit/lib/Server.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const path = require("path"); const sinon = require("sinon"); diff --git a/test/unit/lib/Settings.mocks.js b/test/unit/lib/Settings.mocks.js index e5f47553b..fa02255a4 100644 --- a/test/unit/lib/Settings.mocks.js +++ b/test/unit/lib/Settings.mocks.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); jest.mock("../../../lib/Settings"); diff --git a/test/unit/lib/Settings.spec.js b/test/unit/lib/Settings.spec.js index 2415bbfeb..4c6437ea4 100644 --- a/test/unit/lib/Settings.spec.js +++ b/test/unit/lib/Settings.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const Settings = require("../../../lib/Settings"); describe("Settings", () => { diff --git a/test/unit/lib/helpers.spec.js b/test/unit/lib/helpers.spec.js index 6f3ebb1ec..241624891 100644 --- a/test/unit/lib/helpers.spec.js +++ b/test/unit/lib/helpers.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const helpers = require("../../../lib/common/helpers"); describe("helpers", () => { diff --git a/test/unit/lib/middlewares.spec.js b/test/unit/lib/middlewares.spec.js index 0ad37d057..3181154da 100644 --- a/test/unit/lib/middlewares.spec.js +++ b/test/unit/lib/middlewares.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const Boom = require("boom"); diff --git a/test/unit/lib/start.spec.js b/test/unit/lib/start.spec.js index 6da0b5a62..dc7b753bb 100644 --- a/test/unit/lib/start.spec.js +++ b/test/unit/lib/start.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + const sinon = require("sinon"); const Boom = require("boom"); diff --git a/test/utils/CliRunner.js b/test/utils/CliRunner.js index b331ca4e1..8240bf9e0 100644 --- a/test/utils/CliRunner.js +++ b/test/utils/CliRunner.js @@ -1,3 +1,14 @@ +/* +Copyright 2019 Javier Brea +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const EventEmitter = require("events"); @@ -106,7 +117,9 @@ module.exports = class CliRunner { return this._exitPromise; } - async hasPrinted(data, action, timeOut = 1000) { + async hasPrinted(data, inputAction, inputTimeOut = 1000) { + let timeOut = inputTimeOut; + let action = inputAction; if (isNumber(action)) { timeOut = action; action = null; diff --git a/test/utils/index.js b/test/utils/index.js index 377a9631d..8abba1bf8 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +*/ + "use strict"; const CliRunner = require("./CliRunner");