Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/commands tests are not built #887

Open
fantonangeli opened this issue Nov 18, 2021 · 0 comments · May be fixed by #888
Open

test/commands tests are not built #887

fantonangeli opened this issue Nov 18, 2021 · 0 comments · May be fixed by #888

Comments

@fantonangeli
Copy link

test/commands files are not built and they are not running in my environment.

Expected Behavior

build/test/commands/ should be built with npm run build.

Actual Behavior

build/test/ doesn't contain the commands folder and the unit tests don't run.

testlogs.txt
ls -lR build

Steps to Reproduce the Problem

1.git clone https://github.com/google/clasp.git
2.npm install
3.npm uninstall -g @google/clasp
4.npm run build
5.export SCRIPT_ID=1EwE84eZCSBPcaAiJzCnDjmxMVnLQrDyhSKq1oZY6q-3x4BIDHgQefCnL
export PROJECT_ID=project-id-3961473932623644264
6.npm run test

Specifications

  • Node version (node -v): v16.11.1
  • Version (clasp -v): 2.4.1
  • OS (Mac/Linux/Windows):Linux 5.14.14-arch1

Possible fix

Change the settings in tsconfig.json from:

  "include": [
    "src/**.ts",
    "test/**.ts"
  ]

to:

  "include": [
    "src/**.ts",
    "test/**/*.ts"
  ]

But after that there is an error with the import of 'test/commands/logout.ts'
testlogs_tsconfigfix.txt

Fixing the imports in 'test/commands/logout.ts', giving them the ".js" extensions to the imports, now the tests are much more:
testlogs_logoutfix.txt

In https://github.com/google/clasp/runs/3466391151 looks like the tests are not running in the CI as well.

Looking at the #793, I don't think this is related to that.
I can PR this 2 changes if make sense, but I'm not sure the test will be all green.

@fantonangeli fantonangeli linked a pull request Nov 18, 2021 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant