Skip to content

Commit

Permalink
Unit Testing and polish (#94)
Browse files Browse the repository at this point in the history
* Move source code into `src` directory
* Write various unit tests to cover core logic
* Add test and push scripts
* Handle non 200 responses within paginated results
* Validate JWT `aud` claim
* Bump version
* Skip any falsey value other than `false` for optional params
  • Loading branch information
Blacksmoke16 authored Mar 30, 2022
1 parent 428e059 commit fec3522
Show file tree
Hide file tree
Showing 16 changed files with 9,452 additions and 1,139 deletions.
2 changes: 1 addition & 1 deletion src/parser/shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: GESI

version: 9.0.0
version: 9.1.0

crystal: '>=0.34.0'

Expand Down
5 changes: 4 additions & 1 deletion src/script/.clasp.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{"scriptId":"1KjnRVVFr2KiHH55sqBfHcZ-yXweJ7iv89V99ubaLy4A7B_YH8rB5u0s3"}
{
"scriptId":"1KjnRVVFr2KiHH55sqBfHcZ-yXweJ7iv89V99ubaLy4A7B_YH8rB5u0s3",
"rootDir": "./src"
}
1 change: 1 addition & 0 deletions src/script/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.13
9,012 changes: 7,937 additions & 1,075 deletions src/script/package-lock.json

Large diffs are not rendered by default.

28 changes: 25 additions & 3 deletions src/script/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "gesi",
"version": "9.0.0",
"version": "9.1.0",
"description": "Google Sheets ESI Add-on",
"scripts": {},
"scripts": {
"test": "jest",
"push": "sed -E -e '/^(export|import)/ s|^/*|//|' -i src/*.ts && clasp push && sed -E -e '/^(\\/\\/export|\\/\\/import)/ s|^/*||' -i src/*.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Blacksmoke16/GESI.git"
Expand All @@ -23,6 +26,25 @@
"devDependencies": {
"@google/clasp": "2.4.*",
"@types/google-apps-script-oauth2": "38.0.0",
"typescript": "4.*"
"@types/jest": "^27.4.1",
"jest": "^27.5.1",
"jest-ts-auto-mock": "^2.1.0",
"ts-auto-mock": "^3.5.0",
"ts-jest": "^27.1.4",
"ttypescript": "^1.5.13",
"typescript": "^4.6.3"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"verbose": false,
"setupFiles": [
"./spec/index.ts"
],
"globals": {
"ts-jest": {
"compiler": "ttypescript"
}
}
}
}
Loading

0 comments on commit fec3522

Please sign in to comment.