> @google/clasp@2.4.1 pretest > npm run compile && npm run check > @google/clasp@2.4.1 compile > tsc > @google/clasp@2.4.1 check > gts check src/*.ts src/**/*.ts test/*.ts test/**/*.ts version: 16 /home/workspace/clasp/clasp/src/commands/apis.ts 33:10 warning '_bin' is assigned a value but never used @typescript-eslint/no-unused-vars 33:16 warning '_sourcePath' is assigned a value but never used @typescript-eslint/no-unused-vars 34:10 warning '_command' is assigned a value but never used @typescript-eslint/no-unused-vars /home/workspace/clasp/clasp/src/commands/run.ts 93:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 119:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 119:77 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /home/workspace/clasp/clasp/src/files.ts 314:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /home/workspace/clasp/clasp/src/index.ts 392:8 warning '_bin' is assigned a value but never used @typescript-eslint/no-unused-vars 392:14 warning '_sourcePath' is assigned a value but never used @typescript-eslint/no-unused-vars /home/workspace/clasp/clasp/src/messages.ts 123:21 warning '_scriptId' is defined but never used @typescript-eslint/no-unused-vars 124:22 warning '_scriptId' is defined but never used @typescript-eslint/no-unused-vars /home/workspace/clasp/clasp/src/utils.ts 81:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 263:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any ✖ 13 problems (0 errors, 13 warnings) > @google/clasp@2.4.1 test > nyc mocha --cache false --timeout 100000 --recursive build/test Test clasp apis functions 1) should list apis correctly ✔ should ask for an API when trying to enable (2217ms) 2) should enable sheets ✔ should give error message for non-existent API (3496ms) ✔ should ask for an API when trying to disable (2068ms) 3) should disable apis correctly 4) should show suggestions for using clasp apis ✔ should error with unknown subcommand (2102ms) ✔ should open APIs dashboard (1959ms) Test clasp clone function 5) should clone a project with scriptId correctly 6) should clone a project with scriptURL correctly ✔ should give an error on a non-existing project (4323ms) Test clasp clone function ✔ should prompt for which script to clone correctly (3772ms) ✔ should prompt which project to clone and clone it (8952ms) 7) should give an error if .clasp.json already exists Test clasp create function ✔ should prompt for a project name correctly (3554ms) 8) should not prompt for project name Test clasp create function ✔ should create a new project named <title> correctly (13824ms) Test clasp create <parentId> function ✔ should not prompt for script types with parentId (3840ms) Test missing command function ✔ should report missing command correctly (1326ms) Test clasp deploy function 9) should deploy correctly Test clasp deployments function 10) should list deployments correctly Test clasp list function ✔ should list clasp projects correctly (3492ms) ✔ does not shorten project names when indicated not to (3534ms) Test clasp login function ✔ should exit(0) with LOG.DEFAULT_CREDENTIALS for default login (no global or local rc) (2670ms) ✔ should exit(0) ERROR.LOGGED_IN if global rc and no --creds option but continue to login (2297ms) ✔ should exit(1) with ERROR.LOGGED_IN if local rc and --creds option (2170ms) - should exit(1) with ERROR.CREDENTIALS_DNE if --creds file does not exist - should exit(1) with ERROR.BAD_CREDENTIALS_FILE if --creds file invalid - should exit(0) with ERROR.BAD_CREDENTIALS_FILE if --creds file corrupt json ✔ should exit(1) with LOG.CREDS_FROM_PROJECT if global rc and --creds file valid (2262ms) Test clasp logout function ✔ should remove global AND local credentials (1135ms) ✔ should still work with no clasprc file (1165ms) Test clasp logs setup ✔ should prompt for logs setup (2051ms) ✔ should prompt for logs setup (2039ms) Test clasp logs function 11) should get some logs Test clasp open function ✔ should open script correctly (1163ms) ✔ should error with incorrect scriptId if length < 30 (1402ms) ✔ open credentials page correctly (1150ms) 12) open webapp page correctly ✔ open parent page correctly (1552ms) - open webapp with deploymentId page correctly Test clasp push function 13) should push local project correctly - should return non-0 exit code when push failed Test clasp push with no `.claspignore` 14) should push local project correctly - should return non-0 exit code when push failed Test clasp run function ✔ should properly run in dev mode (3652ms) ✔ should not run in dev mode (3187ms) ✔ should prompt for which function to run (3795ms) ✔ should not prompt for which function to run (3822ms) - should prompt for project ID - should prompt to set up new OAuth client Test clasp status function ✔ should respect globs and negation rules (2457ms) ✔ should ignore dotfiles if the parent folder is ignored (2065ms) ✔ should respect globs and negation rules when rootDir given (2023ms) ✔ should respect globs and negation rules when relative rootDir given (1963ms) Test files isValidFileName function ✔ should return true for valid combinations of input ✔ should return false for invalid combinations of input Test getManifest function ✔ should get a valid manifest file correctly Test isValidRunManifest function ✔ should validate a manifest with run permissions ✔ should not validate a manifest with run permissions Test isValidManifest function ✔ should validate a manifest Test --help for each function - should run --help - should logs --help - should login --help - should logout --help - should create --help - should clone --help - should pull --help - should push --help - should status --help - should open --help - should deployments --help - should undeploy --help - should versions --help - should version --help - should list --help - should apis --help - should help --help Test extractScriptId function ✔ should return scriptId correctly Test clasp pull function 15) should pull an existing project correctly Test URL utils function ✔ should create Script URL correctly ✔ should create Creds URL correctly Test clasp version and versions function ✔ should prompt for version description (2853ms) 16) should create a new version correctly - should list versions correctly Test setting function ✔ should return current setting value (1174ms) ✔ should update .clasp.json with provided value (1236ms) ✔ should error on unknown keys (2352ms) Test getAppsScriptFileName function from files ✔ should return the basename correctly Test URL helper from utils ✔ should return the scriptURL correctly Test getWebApplicationURL function from utils ✔ should return the scriptURL correctly Test getDefaultProjectName function from utils ✔ should return the current directory name correctly Test getLocalFileType function from utils ✔ should return the lowercase file type correctly ✔ should return the specified file extention if the file type is SERVER_JS Test getAPIFileType function from utils ✔ should return the uppercase file type correctly Test saveProject function from utils ✔ should save the scriptId correctly ✔ should save the scriptId, rootDir correctly Test variations of clasp help ✔ should show help for clasp help (1121ms) ✔ should show help for clasp --help (1143ms) ✔ should show help for clasp -h (1120ms) Test variations of clasp --version ✔ should show version for clasp --version (1165ms) ✔ should show version for clasp -v (1152ms) Test unknown functions ✔ should show version correctly (1087ms) Test all functions while logged out ✔ should fail to list (no credentials) (1962ms) ✔ should fail to clone (no credentials) (2410ms) ✔ should fail to push (no credentials) (2051ms) ✔ should fail to deployments (no credentials) (1916ms) ✔ should fail to deploy (no credentials) (2025ms) ✔ should fail to version (no credentials) (1947ms) ✔ should fail to versions (no credentials) (1996ms) ✔ should fail to pull (no .clasp.json file) (2471ms) ✔ should fail to open (no .clasp.json file) (1235ms) ✔ should fail to show logs (no .clasp.json file) (1987ms) Test getValidJSON function ✔ should parse valid params and throw exception for invalid params 73 passing (3m) 26 pending 16 failing 1) Test clasp apis functions should list apis correctly: AssertionError: expected '\n# Currently enabled APIs:\n' to include '# List of available APIs:' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/apis.js:12:34) at processImmediate (node:internal/timers:464:21) 2) Test clasp apis functions should enable sheets: AssertionError: expected 'GaxiosError: Permission denied to enable service [sheets.googleapis.com]\nHelp Token: Ae-hA1NO26y_CVL_IiluSvnNXeROj8MPdrhfE2Cqczh71Q78MTgXHHbHZixxu_osUe7ZuQwpmWA4JgctxOIqwwwuhFHn8cZUerYwQ2Ebe0EUY1iq\n at Gaxios._request (/home/workspace/clasp/clasp/node_modules/gaxios/build/src/gaxios.js:127:23)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async OAuth2Client.requestAsync (/home/workspace/clasp/clasp/node_modules/google-auth-library/build/src/auth/oauth2client.js:345:18)\n at async enableOrDisableAPI (file:///home/workspace/clasp/clasp/build/src/apiutils.js:59:9)\n at async Command.default (file:///home/workspace/clasp/clasp/build/src/commands/apis.js:82:9)\n at async Command.parseAsync (/home/workspace/clasp/clasp/node_modules/commander/lib/command.js:871:5)\n at async file:///home/workspace/clasp/clasp/build/src/index.js:361:9 {\n response: {\n config: {\n url: \'https://serviceusage.googleapis.com/v1/projects/project-id-3961473932623644264/services/sheets.googleapis.com:enable\',\n method: \'POST\',\n userAgentDirectives: [Array],\n paramsSerializer: [Function (anonymous)],\n headers: [Object],\n params: {},\n validateStatus: [Function (anonymous)],\n retry: true,\n responseType: \'json\',\n retryConfig: [Object]\n },\n data: { error: [Object] },\n headers: {\n \'alt-svc\': \'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"\',\n \'cache-control\': \'private\',\n connection: \'close\',\n \'content-encoding\': \'gzip\',\n \'content-type\': \'application/json; charset=UTF-8\',\n date: \'Thu, 18 Nov 2021 11:34:51 GMT\',\n server: \'ESF\',\n \'transfer-encoding\': \'chunked\',\n vary: \'Origin, X-Origin, Referer\',\n \'x-content-type-options\': \'nosniff\',\n \'x-frame-options\': \'SAMEORIGIN\',\n \'x-xss-protection\': \'0\'\n },\n status: 403,\n statusText: \'Forbidden\',\n request: {\n responseURL: \'https://serviceusage.googleapis.com/v1/projects/project-id-3961473932623644264/services/sheets.googleapis.com:enable\'\n }\n },\n config: {\n url: \'https://serviceusage.googleapis.com/v1/projects/project-id-3961473932623644264/services/sheets.googleapis.com:enable\',\n method: \'POST\',\n userAgentDirectives: [ [Object] ],\n paramsSerializer: [Function (anonymous)],\n headers: {\n \'x-goog-api-client\': \'gdcl/5.0.2 gl-node/16.11.1 auth/7.6.2\',\n \'Accept-Encoding\': \'gzip\',\n \'User-Agent\': \'google-api-nodejs-client/5.0.2 (gzip)\',\n Authorization: \'Bearer ya29.a0ARrdaM9cbNIXML2Yt2fm4wcyAZYLN3qtpSD7DRjwxdL0QorhJI-UeLXD2hCQW6rA4xgm07KhR6IozUFYXovHs1WEJNT1GBTFhr6gT11rcV0xdha-pHWLaWumq33XjXcgXsaM_fGyAtnbC_JzkLcK-lQmouj2Ew\',\n Accept: \'application/json\'\n },\n params: {},\n validateStatus: [Function (anonymous)],\n retry: true,\n responseType: \'json\',\n retryConfig: {\n currentRetryAttempt: 0,\n retry: 3,\n httpMethodsToRetry: [Array],\n noResponseRetries: 2,\n statusCodesToRetry: [Array]\n }\n },\n code: 403,\n errors: [\n {\n message: \'Permission denied to enable service [sheets.googleapis.com]\\n\' +\n \'Help Token: Ae-hA1NO26y_CVL_IiluSvnNXeROj8MPdrhfE2Cqczh71Q78MTgXHHbHZixxu_osUe7ZuQwpmWA4JgctxOIqwwwuhFHn8cZUerYwQ2Ebe0EUY1iq\',\n domain: \'global\',\n reason: \'forbidden\'\n }\n ]\n}\n' to include 'Enabled sheets API.' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/apis.js:23:34) at processImmediate (node:internal/timers:464:21) 3) Test clasp apis functions should disable apis correctly: AssertionError: expected 'GaxiosError: Permission denied to disable service [sheets.googleapis.com]\nHelp Token: Ae-hA1MaJry6joIU3jvUSu6cW1aZXpphNqH_3JvB8GQGAeiZCsjYrRw20JhwJbzSZYj6AbmJU7FKviaFWgmvD2pRWP-ZWdiLTp_ROMC0fuWNO0fQ\n at Gaxios._request (/home/workspace/clasp/clasp/node_modules/gaxios/build/src/gaxios.js:127:23)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async OAuth2Client.requestAsync (/home/workspace/clasp/clasp/node_modules/google-auth-library/build/src/auth/oauth2client.js:345:18)\n at async enableOrDisableAPI (file:///home/workspace/clasp/clasp/build/src/apiutils.js:59:9)\n at async Command.default (file:///home/workspace/clasp/clasp/build/src/commands/apis.js:82:9)\n at async Command.parseAsync (/home/workspace/clasp/clasp/node_modules/commander/lib/command.js:871:5)\n at async file:///home/workspace/clasp/clasp/build/src/index.js:361:9 {\n response: {\n config: {\n url: \'https://serviceusage.googleapis.com/v1/projects/project-id-3961473932623644264/services/sheets.googleapis.com:disable\',\n method: \'POST\',\n userAgentDirectives: [Array],\n paramsSerializer: [Function (anonymous)],\n headers: [Object],\n params: {},\n validateStatus: [Function (anonymous)],\n retry: true,\n responseType: \'json\',\n retryConfig: [Object]\n },\n data: { error: [Object] },\n headers: {\n \'alt-svc\': \'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"\',\n \'cache-control\': \'private\',\n connection: \'close\',\n \'content-encoding\': \'gzip\',\n \'content-type\': \'application/json; charset=UTF-8\',\n date: \'Thu, 18 Nov 2021 11:34:59 GMT\',\n server: \'ESF\',\n \'transfer-encoding\': \'chunked\',\n vary: \'Origin, X-Origin, Referer\',\n \'x-content-type-options\': \'nosniff\',\n \'x-frame-options\': \'SAMEORIGIN\',\n \'x-xss-protection\': \'0\'\n },\n status: 403,\n statusText: \'Forbidden\',\n request: {\n responseURL: \'https://serviceusage.googleapis.com/v1/projects/project-id-3961473932623644264/services/sheets.googleapis.com:disable\'\n }\n },\n config: {\n url: \'https://serviceusage.googleapis.com/v1/projects/project-id-3961473932623644264/services/sheets.googleapis.com:disable\',\n method: \'POST\',\n userAgentDirectives: [ [Object] ],\n paramsSerializer: [Function (anonymous)],\n headers: {\n \'x-goog-api-client\': \'gdcl/5.0.2 gl-node/16.11.1 auth/7.6.2\',\n \'Accept-Encoding\': \'gzip\',\n \'User-Agent\': \'google-api-nodejs-client/5.0.2 (gzip)\',\n Authorization: \'Bearer ya29.a0ARrdaM9cbNIXML2Yt2fm4wcyAZYLN3qtpSD7DRjwxdL0QorhJI-UeLXD2hCQW6rA4xgm07KhR6IozUFYXovHs1WEJNT1GBTFhr6gT11rcV0xdha-pHWLaWumq33XjXcgXsaM_fGyAtnbC_JzkLcK-lQmouj2Ew\',\n Accept: \'application/json\'\n },\n params: {},\n validateStatus: [Function (anonymous)],\n retry: true,\n responseType: \'json\',\n retryConfig: {\n currentRetryAttempt: 0,\n retry: 3,\n httpMethodsToRetry: [Array],\n noResponseRetries: 2,\n statusCodesToRetry: [Array]\n }\n },\n code: 403,\n errors: [\n {\n message: \'Permission denied to disable service [sheets.googleapis.com]\\n\' +\n \'Help Token: Ae-hA1MaJry6joIU3jvUSu6cW1aZXpphNqH_3JvB8GQGAeiZCsjYrRw20JhwJbzSZYj6AbmJU7FKviaFWgmvD2pRWP-ZWdiLTp_ROMC0fuWNO0fQ\',\n domain: \'global\',\n reason: \'forbidden\'\n }\n ]\n}\n' to include 'Disabled sheets API.' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/apis.js:39:34) at processImmediate (node:internal/timers:464:21) 4) Test clasp apis functions should show suggestions for using clasp apis: AssertionError: expected '\n# Currently enabled APIs:\n' to include '# Try these commands:\n- clasp apis list\n- clasp apis enable slides\n- clasp apis disable slides' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/apis.js:45:34) at processImmediate (node:internal/timers:464:21) 5) Test clasp clone <scriptId> function should clone a project with scriptId correctly: AssertionError: expected '' to include 'Cloned' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/clone.js:14:34) at processImmediate (node:internal/timers:464:21) 6) Test clasp clone <scriptId> function should clone a project with scriptURL correctly: AssertionError: expected '' to include 'Cloned' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/clone.js:23:34) at processImmediate (node:internal/timers:464:21) 7) Test clasp clone function should give an error if .clasp.json already exists: AssertionError: expected 'Project file (/home/workspace/clasp/clasp/.clasp.json) already exists.\n' to include 'Project file (.clasp.json) already exists.' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/clone.js:58:34) at processImmediate (node:internal/timers:464:21) 8) Test clasp create function should not prompt for project name: AssertionError: expected 'Project file (/home/workspace/clasp/clasp/.clasp.json) already exists.\n' to include 'Project file (.clasp.json) already exists.' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/create.js:19:34) at processImmediate (node:internal/timers:464:21) 9) Test clasp deploy function should deploy correctly: AssertionError: expected [ Array(1) ] to match /(?:Scripts may only have up to 20 versioned deployments at a time|Currently just one deployment can be created at a time)/ at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/deploy.js:16:40) at processImmediate (node:internal/timers:464:21) 10) Test clasp deployments function should list deployments correctly: AssertionError: expected '' to include 'Deployment' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/deployments.js:10:34) at processImmediate (node:internal/timers:464:21) 11) Test clasp logs function should get some logs: AssertionError: expected '' to have a length above 10 but got 0 + expected - actual -0 +10 at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/logs.js:28:40) at processImmediate (node:internal/timers:464:21) 12) Test clasp open function open webapp page correctly: AssertionError: expected '' to include 'Open which deployment?' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/open.js:25:34) at processImmediate (node:internal/timers:464:21) 13) Test clasp push function should push local project correctly: AssertionError: expected '' to include 'Pushed 2 files.' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/push.js:13:34) at processImmediate (node:internal/timers:464:21) 14) Test clasp push with no `.claspignore` should push local project correctly: AssertionError: expected '' to include 'Code.js' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/commands/push.js:41:34) at processImmediate (node:internal/timers:464:21) 15) Test clasp pull function should pull an existing project correctly: AssertionError: expected '' to include 'Cloned' at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/test.js:55:34) at processImmediate (node:internal/timers:464:21) 16) Test clasp version and versions function should create a new version correctly: AssertionError: expected 0 to be above 0 + expected - actual at Context.<anonymous> (file:///home/workspace/clasp/clasp/build/test/test.js:88:37) at processImmediate (node:internal/timers:464:21) =============================== Coverage summary =============================== Statements : Unknown% ( 0/0 ) Branches : Unknown% ( 0/0 ) Functions : Unknown% ( 0/0 ) Lines : Unknown% ( 0/0 ) ================================================================================