- add test to ci pipeline ci.yml
Some checks are pending
CI Pipeline / japa-tests (push) Has started running

This commit is contained in:
Kaimbacher 2023-05-09 14:43:16 +02:00
parent a48a2d9704
commit 578c4180f4
7 changed files with 205 additions and 186 deletions

45
.gitea/workflows/ci.yaml Normal file
View File

@ -0,0 +1,45 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI Pipeline
run-name: ${{ github.actor }} is running CI pipeline
# trigger build when pushing, or when creating a pull request
on: [push, pull_request]
jobs:
japa-tests:
# run build on latest ubuntu
runs-on: ubuntu-latest
container:
image: node:16.x
steps:
# this will check out the current branch (https://github.com/actions/checkout#Push-a-commit-using-the-built-in-token)
- name: Check out repository code
uses: actions/checkout@v3
# installing Node
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
# this will use the latest Node 12 version
node-version: 16.x
# install dependencies using clean install to avoid package lock updates
# build the project if necessary
# - run: npm run build
# - run: cd build
- name: Install dependencies
run: npm ci
# - run: npm ci --omit=dev
# finally run the tests
# - run: npm test
- name: Run tests
run: node ace test
# # Save coverage report in Coveralls
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

230
package-lock.json generated
View File

@ -2602,14 +2602,14 @@
} }
}, },
"node_modules/@eslint/eslintrc": { "node_modules/@eslint/eslintrc": {
"version": "2.0.2", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
"integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
"debug": "^4.3.2", "debug": "^4.3.2",
"espree": "^9.5.1", "espree": "^9.5.2",
"globals": "^13.19.0", "globals": "^13.19.0",
"ignore": "^5.2.0", "ignore": "^5.2.0",
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
@ -2670,9 +2670,9 @@
} }
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "8.39.0", "version": "8.40.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz",
"integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -3841,9 +3841,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.16.3", "version": "18.16.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.6.tgz",
"integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==" "integrity": "sha512-N7KINmeB8IN3vRR8dhgHEp+YpWvGFcpDoh5XZ8jB5a00AdFKCKEyyGTOPTddUf4JqU1ZKTVxkOxakDvchNVI2Q=="
}, },
"node_modules/@types/pino": { "node_modules/@types/pino": {
"version": "6.3.12", "version": "6.3.12",
@ -3902,9 +3902,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/semver": { "node_modules/@types/semver": {
"version": "7.3.13", "version": "7.5.0",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz",
"integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==",
"dev": true "dev": true
}, },
"node_modules/@types/send": { "node_modules/@types/send": {
@ -3965,9 +3965,9 @@
} }
}, },
"node_modules/@types/validator": { "node_modules/@types/validator": {
"version": "13.7.15", "version": "13.7.16",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.15.tgz", "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.16.tgz",
"integrity": "sha512-yeinDVQunb03AEP8luErFcyf/7Lf7AzKCD0NXfgVoGCCQDNpZET8Jgq74oBgqKld3hafLbfzt/3inUdQvaFeXQ==" "integrity": "sha512-VyKmLktUHYLbrSbsRi241MSUlGYomQgK/tfCNpej3Gt5qDOM10AZ3nU2aR2s5JritClXuOBu4K7MkywVW/Y6Ow=="
}, },
"node_modules/@types/ws": { "node_modules/@types/ws": {
"version": "8.5.4", "version": "8.5.4",
@ -3994,15 +3994,15 @@
"dev": true "dev": true
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz",
"integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/type-utils": "5.59.2", "@typescript-eslint/type-utils": "5.59.5",
"@typescript-eslint/utils": "5.59.2", "@typescript-eslint/utils": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"grapheme-splitter": "^1.0.4", "grapheme-splitter": "^1.0.4",
"ignore": "^5.2.0", "ignore": "^5.2.0",
@ -4028,14 +4028,14 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz",
"integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -4055,13 +4055,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz",
"integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/visitor-keys": "5.59.2" "@typescript-eslint/visitor-keys": "5.59.5"
}, },
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -4072,13 +4072,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz",
"integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"@typescript-eslint/utils": "5.59.2", "@typescript-eslint/utils": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"tsutils": "^3.21.0" "tsutils": "^3.21.0"
}, },
@ -4099,9 +4099,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz",
"integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -4112,13 +4112,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz",
"integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/visitor-keys": "5.59.2", "@typescript-eslint/visitor-keys": "5.59.5",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -4189,17 +4189,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz",
"integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9", "@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12", "@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.59.2", "@typescript-eslint/scope-manager": "5.59.5",
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"@typescript-eslint/typescript-estree": "5.59.2", "@typescript-eslint/typescript-estree": "5.59.5",
"eslint-scope": "^5.1.1", "eslint-scope": "^5.1.1",
"semver": "^7.3.7" "semver": "^7.3.7"
}, },
@ -4237,12 +4237,12 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "5.59.2", "version": "5.59.5",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz",
"integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "5.59.2", "@typescript-eslint/types": "5.59.5",
"eslint-visitor-keys": "^3.3.0" "eslint-visitor-keys": "^3.3.0"
}, },
"engines": { "engines": {
@ -4534,9 +4534,9 @@
} }
}, },
"node_modules/@webpack-cli/configtest": { "node_modules/@webpack-cli/configtest": {
"version": "2.0.1", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.0.tgz",
"integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", "integrity": "sha512-K/vuv72vpfSEZoo5KIU0a2FsEoYdW0DUMtMpB5X3LlUwshetMZRZRxB7sCsVji/lFaSxtQQ3aM9O4eMolXkU9w==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"engines": { "engines": {
@ -4562,9 +4562,9 @@
} }
}, },
"node_modules/@webpack-cli/serve": { "node_modules/@webpack-cli/serve": {
"version": "2.0.2", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.2.tgz", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.4.tgz",
"integrity": "sha512-S9h3GmOmzUseyeFW3tYNnWS7gNUuwxZ3mmMq0JyW78Vx1SGKPSkt5bT4pB0rUnVfHjP0EL9gW2bOzmtiTfQt0A==", "integrity": "sha512-0xRgjgDLdz6G7+vvDLlaRpFatJaJ69uTalZLRSMX5B3VUrDmXcrVA3+6fXXQgmYz7bY9AAgs348XQdmtLsK41A==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"engines": { "engines": {
@ -5839,9 +5839,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001482", "version": "1.0.30001486",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001482.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz",
"integrity": "sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==", "integrity": "sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -6482,9 +6482,9 @@
} }
}, },
"node_modules/core-js-compat": { "node_modules/core-js-compat": {
"version": "3.30.1", "version": "3.30.2",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.30.1.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.30.2.tgz",
"integrity": "sha512-d690npR7MC6P0gq4npTl5n2VQeNAmUrJ90n+MHiKS7W2+xno4o3F5GDEuylSdi6EJ3VssibSGXOa1r3YXD3Mhw==", "integrity": "sha512-nriW1nuJjUgvkEjIot1Spwakz52V9YkYHZAQG6A1eCgC8AA1p0zngrQEP9R0+V6hji5XilWKG1Bd0YRppmGimA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"browserslist": "^4.21.5" "browserslist": "^4.21.5"
@ -7541,9 +7541,9 @@
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.380", "version": "1.4.387",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.380.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.387.tgz",
"integrity": "sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==", "integrity": "sha512-tutLf+alr1/0YqJwKPdstVvDLmxmLb5xNyDLNS0RZmenHcEYk9qKfpKDCVZEKJ00JVbnayJm1MZAbYhYDFpcOw==",
"dev": true "dev": true
}, },
"node_modules/emittery": { "node_modules/emittery": {
@ -7691,15 +7691,15 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "8.39.0", "version": "8.40.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz",
"integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@eslint/eslintrc": "^2.0.2", "@eslint/eslintrc": "^2.0.3",
"@eslint/js": "8.39.0", "@eslint/js": "8.40.0",
"@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8", "@nodelib/fs.walk": "^1.2.8",
@ -7710,8 +7710,8 @@
"doctrine": "^3.0.0", "doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0", "escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.2.0", "eslint-scope": "^7.2.0",
"eslint-visitor-keys": "^3.4.0", "eslint-visitor-keys": "^3.4.1",
"espree": "^9.5.1", "espree": "^9.5.2",
"esquery": "^1.4.2", "esquery": "^1.4.2",
"esutils": "^2.0.2", "esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
@ -7813,9 +7813,9 @@
} }
}, },
"node_modules/eslint-visitor-keys": { "node_modules/eslint-visitor-keys": {
"version": "3.4.0", "version": "3.4.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
"integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -7948,14 +7948,14 @@
} }
}, },
"node_modules/espree": { "node_modules/espree": {
"version": "9.5.1", "version": "9.5.2",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz",
"integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"acorn": "^8.8.0", "acorn": "^8.8.0",
"acorn-jsx": "^5.3.2", "acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.4.0" "eslint-visitor-keys": "^3.4.1"
}, },
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -12362,9 +12362,9 @@
} }
}, },
"node_modules/pinia": { "node_modules/pinia": {
"version": "2.0.35", "version": "2.0.36",
"resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.35.tgz", "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.36.tgz",
"integrity": "sha512-P1IKKQWhxGXiiZ3atOaNI75bYlFUbRxtJdhPLX059Z7+b9Z04rnTZdSY8Aph1LA+/4QEMAYHsTQ638Wfe+6K5g==", "integrity": "sha512-4UKApwjlmJH+VuHKgA+zQMddcCb3ezYnyewQ9NVrsDqZ/j9dMv5+rh+1r48whKNdpFkZAWVxhBp5ewYaYX9JcQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@vue/devtools-api": "^6.5.0", "@vue/devtools-api": "^6.5.0",
@ -12388,9 +12388,9 @@
} }
}, },
"node_modules/pinia/node_modules/vue-demi": { "node_modules/pinia/node_modules/vue-demi": {
"version": "0.14.0", "version": "0.14.1",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.0.tgz", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.1.tgz",
"integrity": "sha512-gt58r2ogsNQeVoQ3EhoUAvUsH9xviydl0dWJj7dabBC/2L4uBId7ujtCwDRD0JhkGsV1i0CtfLAeyYKBht9oWg==", "integrity": "sha512-rt+yuCtXvscYot9SQQj3WKZJVSriPNqVkpVBNEHPzSgBv7QIYzsS410VqVgvx8f9AAPgjg+XPKvmV3vOqqkJQQ==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
@ -12493,9 +12493,9 @@
} }
}, },
"node_modules/pino-std-serializers": { "node_modules/pino-std-serializers": {
"version": "6.2.0", "version": "6.2.1",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.0.tgz", "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.1.tgz",
"integrity": "sha512-IWgSzUL8X1w4BIWTwErRgtV8PyOGOOi60uqv0oKuS/fOA8Nco/OeI6lBuc4dyP8MMfdFwyHqTMcBIA7nDiqEqA==" "integrity": "sha512-wHuWB+CvSVb2XqXM0W/WOYUkVSPbiJb9S5fNB7TBhd8s892Xq910bRxwHtC4l71hgztObTjXL6ZheZXFjhDrDQ=="
}, },
"node_modules/pino/node_modules/pino-std-serializers": { "node_modules/pino/node_modules/pino-std-serializers": {
"version": "3.2.0", "version": "3.2.0",
@ -13617,9 +13617,9 @@
} }
}, },
"node_modules/readable-stream": { "node_modules/readable-stream": {
"version": "4.3.0", "version": "4.4.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.0.tgz",
"integrity": "sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==", "integrity": "sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==",
"dependencies": { "dependencies": {
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
"buffer": "^6.0.3", "buffer": "^6.0.3",
@ -15350,9 +15350,9 @@
} }
}, },
"node_modules/terser": { "node_modules/terser": {
"version": "5.17.1", "version": "5.17.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.17.1.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.2.tgz",
"integrity": "sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==", "integrity": "sha512-1D1aGbOF1Mnayq5PvfMc0amAR1y5Z1nrZaGCvI5xsdEfZEVte8okonk02OiaK5fw5hG1GWuuVsakOnpZW8y25A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/source-map": "^0.3.2", "@jridgewell/source-map": "^0.3.2",
@ -15368,16 +15368,16 @@
} }
}, },
"node_modules/terser-webpack-plugin": { "node_modules/terser-webpack-plugin": {
"version": "5.3.7", "version": "5.3.8",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.8.tgz",
"integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", "integrity": "sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/trace-mapping": "^0.3.17", "@jridgewell/trace-mapping": "^0.3.17",
"jest-worker": "^27.4.5", "jest-worker": "^27.4.5",
"schema-utils": "^3.1.1", "schema-utils": "^3.1.1",
"serialize-javascript": "^6.0.1", "serialize-javascript": "^6.0.1",
"terser": "^5.16.5" "terser": "^5.16.8"
}, },
"engines": { "engines": {
"node": ">= 10.13.0" "node": ">= 10.13.0"
@ -16270,9 +16270,9 @@
} }
}, },
"node_modules/webpack": { "node_modules/webpack": {
"version": "5.81.0", "version": "5.82.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.81.0.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.82.0.tgz",
"integrity": "sha512-AAjaJ9S4hYCVODKLQTgG5p5e11hiMawBwV2v8MYLE0C/6UAGLuAF4n1qa9GOwdxnicaP+5k6M5HrLmD4+gIB8Q==", "integrity": "sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@ -16318,16 +16318,16 @@
} }
}, },
"node_modules/webpack-cli": { "node_modules/webpack-cli": {
"version": "5.0.2", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.2.tgz", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.1.tgz",
"integrity": "sha512-4y3W5Dawri5+8dXm3+diW6Mn1Ya+Dei6eEVAdIduAmYNLzv1koKVAqsfgrrc9P2mhrYHQphx5htnGkcNwtubyQ==", "integrity": "sha512-OLJwVMoXnXYH2ncNGU8gxVpUtm3ybvdioiTvHgUyBuyMLKiVvWy+QObzBsMtp5pH7qQoEuWgeEUQ/sU3ZJFzAw==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@discoveryjs/json-ext": "^0.5.0", "@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^2.0.1", "@webpack-cli/configtest": "^2.1.0",
"@webpack-cli/info": "^2.0.1", "@webpack-cli/info": "^2.0.1",
"@webpack-cli/serve": "^2.0.2", "@webpack-cli/serve": "^2.0.4",
"colorette": "^2.0.14", "colorette": "^2.0.14",
"commander": "^10.0.1", "commander": "^10.0.1",
"cross-spawn": "^7.0.3", "cross-spawn": "^7.0.3",
@ -16474,9 +16474,9 @@
} }
}, },
"node_modules/webpack-dev-server": { "node_modules/webpack-dev-server": {
"version": "4.13.3", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.13.3.tgz", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.0.tgz",
"integrity": "sha512-KqqzrzMRSRy5ePz10VhjyL27K2dxqwXQLP5rAKwRJBPUahe7Z2bBWzHw37jeb8GCPKxZRO79ZdQUAPesMh/Nug==", "integrity": "sha512-HmNB5QeSl1KpulTBQ8UT4FPrByYyaLxpJoQ0+s7EvUrMc16m0ZS1sgb1XGqzmgCPk0c9y+aaXxn11tbLzuM7NQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/bonjour": "^3.5.9", "@types/bonjour": "^3.5.9",

View File

@ -9,7 +9,8 @@
"start": "node server.js", "start": "node server.js",
"lint": "eslint . --ext=.ts", "lint": "eslint . --ext=.ts",
"format": "prettier --write .", "format": "prettier --write .",
"format-check": "prettier --check ./**/*.ts" "format-check": "prettier --check ./**/*.ts",
"test": "node ace test"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [

View File

@ -74,7 +74,7 @@ export default class DrawControlComponent extends Vue {
@Prop public southWest; @Prop public southWest;
@Prop public northEast; @Prop public northEast;
public isToggled = false;
mapService = MapService(); mapService = MapService();
// try: // try:
public _enabled; public _enabled;
@ -128,7 +128,8 @@ export default class DrawControlComponent extends Vue {
this._map.dragging.disable(); this._map.dragging.disable();
} }
//TODO refactor: move cursor to styles //TODO refactor: move cursor to styles
// this._container.style.cursor = 'crosshair'; // this._map.domElement.style.cursor = 'crosshair';
this._map._container.style.cursor = "crosshair";
// this._tooltip.updateContent({text: this._initialLabelText}); // this._tooltip.updateContent({text: this._initialLabelText});
this._map this._map
.on('mousedown', this._onMouseDown, this) .on('mousedown', this._onMouseDown, this)
@ -141,7 +142,7 @@ export default class DrawControlComponent extends Vue {
// (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means, // (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means,
// handler can't event.preventDefault // handler can't event.preventDefault
// check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners // check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners
document.addEventListener('touchstart', preventDefault, { passive: false }); // document.addEventListener('touchstart', preventDefault, { passive: false });
} }
} }
@ -156,7 +157,7 @@ export default class DrawControlComponent extends Vue {
} }
//TODO refactor: move cursor to styles //TODO refactor: move cursor to styles
// this._container.style.cursor = ''; this._map._container.style.cursor = '';
this._map this._map
.off('mousedown', this._onMouseDown, this) .off('mousedown', this._onMouseDown, this)
@ -167,7 +168,7 @@ export default class DrawControlComponent extends Vue {
off(document, 'mouseup', this._onMouseUp, this); off(document, 'mouseup', this._onMouseUp, this);
off(document, 'touchend', this._onMouseUp, this); off(document, 'touchend', this._onMouseUp, this);
document.removeEventListener('touchstart', preventDefault); // document.removeEventListener('touchstart', preventDefault);
// If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return // If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return
// if (this._shape) { // if (this._shape) {
@ -241,7 +242,6 @@ export default class DrawControlComponent extends Vue {
} else { } else {
this.enable(); this.enable();
} }
// this.isToggled = !this.isToggled;
} }
// private enable() { // private enable() {
@ -260,41 +260,6 @@ export default class DrawControlComponent extends Vue {
// // this._drawingEditor.cancelDrawing(); // // this._drawingEditor.cancelDrawing();
// // } // // }
// } // }
// created(): void {
// this.featuresLayer = this._createFeaturesLayer();
// }
// private _createFeaturesLayer() {
// let map: Map = (this.map = this.mapService.getMap(this.mapId));
// let layerGroup: LayerGroup = new LayerGroup();
// map.addLayer(layerGroup);
// return layerGroup;
// }
// private _startMarker(latlng, options) {
// let map = this.mapService.getMap(this.mapId);
// latlng = map.getCenter().clone();
// let markerLayer: Marker = this._createMarker(latlng, options); //.addTo(this.map);
// // map.addLayer(markerLayer);
// //this.map.addLayer(marker);
// //marker.enableEdit(this.map).startDrawing(); //editor.startDrawing() -> registerForDrawing
// // let baseEditor = markerLayer.en.enableEdit(this.map);
// // baseEditor.startDrawing();
// return markerLayer;
// }
// private _createMarker(latlng, options): Marker {
// // return this._createLayer((options && options.markerClass) || this.options.markerClass, latlng, options);
// return new Marker(latlng, options);
// }
// private _createLayer(klass, latlngs, options) {
// options = util.extend({ editOptions: { mapTool: this } }, options);
// let layer = new klass(latlngs, options);
// //this.fireAndForward('editable:created', { layer: layer });
// return layer;
// }
} }
</script> </script>

48
test.ts
View File

@ -12,34 +12,34 @@
| |
*/ */
process.env.NODE_ENV = 'test' process.env.NODE_ENV = 'test';
import 'reflect-metadata' import 'reflect-metadata';
import sourceMapSupport from 'source-map-support' import sourceMapSupport from 'source-map-support';
import { Ignitor } from '@adonisjs/core/build/standalone' import { Ignitor } from '@adonisjs/core/build/standalone';
import { configure, processCliArgs, run, RunnerHooksHandler } from '@japa/runner' import { configure, processCliArgs, run, RunnerHooksHandler } from '@japa/runner';
sourceMapSupport.install({ handleUncaughtExceptions: false }) sourceMapSupport.install({ handleUncaughtExceptions: false });
const kernel = new Ignitor(__dirname).kernel('test') const kernel = new Ignitor(__dirname).kernel('test');
kernel kernel
.boot() .boot()
.then(() => import('./tests/bootstrap')) .then(() => import('./tests/bootstrap'))
.then(({ runnerHooks, ...config }) => { .then(({ runnerHooks, ...config }) => {
const app: RunnerHooksHandler[] = [() => kernel.start()] const app: RunnerHooksHandler[] = [() => kernel.start()];
configure({ configure({
...kernel.application.rcFile.tests, ...kernel.application.rcFile.tests,
...processCliArgs(process.argv.slice(2)), ...processCliArgs(process.argv.slice(2)),
...config, ...config,
...{ ...{
importer: (filePath) => import(filePath), importer: (filePath) => import(filePath),
setup: app.concat(runnerHooks.setup), setup: app.concat(runnerHooks.setup),
teardown: runnerHooks.teardown, teardown: runnerHooks.teardown,
}, },
cwd: kernel.application.appRoot, cwd: kernel.application.appRoot,
}) });
run() run();
}) });

View File

@ -1,8 +1,8 @@
import { test } from '@japa/runner' import { test } from '@japa/runner';
test('display welcome page', async ({ client }) => { test('display welcome page', async ({ client }) => {
const response = await client.get('/') const response = await client.get('/');
response.assertStatus(200) response.assertStatus(200);
response.assertTextIncludes('<h1 class="title"> It Works! </h1>') response.assertTextIncludes('<h1 class="title"> It Works! </h1>');
}) });

View File

@ -0,0 +1,8 @@
import { test } from '@japa/runner';
test.group('Home', () => {
test('make sure 2 + 2 is 4', async ({ assert }) => {
assert.equal(2 + 2, 4);
});
});