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

Update imports so tests can be run externally like mint #1157

Closed
wants to merge 1 commit into from

Conversation

prakashsvmx
Copy link
Member

@prakashsvmx prakashsvmx commented May 22, 2023

Update imports so tests can be run externally like mint

How to test locally ( within this repo)

rm -rf dist node_modules && npm install && npm run build
SERVER_ENDPOINT="localhost:22000" ACCESS_KEY="minio" SECRET_KEY="minio123" npm run test

External test:
prakashsvmx/minio-mint-js#1

@prakashsvmx prakashsvmx force-pushed the run-func-test-external branch 3 times, most recently from 02431d0 to 38c6cc9 Compare May 22, 2023 14:09
@prakashsvmx prakashsvmx force-pushed the run-func-test-external branch from cf13534 to ba50486 Compare May 22, 2023 16:48
@@ -25,20 +25,22 @@ import * as url from 'node:url'
import async from 'async'
import chai from 'chai'
import _ from 'lodash'
import { AssumeRoleProvider } from 'minio/dist/main/AssumeRoleProvider.js'
import { CopyDestinationOptions, CopySourceOptions, DEFAULT_REGION } from 'minio/dist/main/helpers.js'
import * as minio from 'minio/dist/main/minio.js'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should start importing the source code minio/src/main/minio.ts instead of importing the dist output.

Should adjust mocha to able to parse typescript files too, though.

@trim21
Copy link
Contributor

trim21 commented May 23, 2023

No need to update test files.

https://github.com/minio/mint/pull/356/files

install

rm -rf "/minio-js"

git clone https://github.com/minio/minio-js.git "minio-js"

cd "/minio-js"

LATEST=$(git tag | tail -1)

git checkout "${LATEST}" --force

npm i

run test

npm --prefix ./minio-js/ run --silent functional -- -R ./minioreporter.js -b --exit 1>>"$output_log_file" 2>"$error_log_file"

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 this pull request may close these issues.

3 participants