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

JST-112: Drop imports using .js extensions and… #527

Merged
merged 11 commits into from
Aug 7, 2023

Conversation

grisha87
Copy link
Contributor

adjust rollup config to produce separate artifacts for browser and nodejs runtimes

@grisha87 grisha87 requested a review from a team July 27, 2023 10:52
yajsapi/task/task.ts Outdated Show resolved Hide resolved
yajsapi/stats/abstract_aggregator.ts Outdated Show resolved Hide resolved
yajsapi/market/service.ts Outdated Show resolved Hide resolved
rollup.config.mjs Outdated Show resolved Hide resolved
@grisha87 grisha87 marked this pull request as draft July 27, 2023 11:03
@grisha87
Copy link
Contributor Author

I was debugging the issue with ts-mocha and imports in tests. It seems that this problem is there only because mocha, because the same test designed for jest works fine:

import {add} from "./check";

describe("Example test", () => {
  test("a+b", () => {
    expect(add(1, 2)).toEqual(3);
  })
});

While in case of ts-mocha, that import is illegal. Seems to be a known problem:
https://stackoverflow.com/questions/60993812/mocha-typescript-cannot-use-import-statement-outside-a-module

@grisha87 grisha87 force-pushed the feature/JST-112/drop-js-extensions-from-inport branch from 06ccc19 to f2306ef Compare July 31, 2023 10:53
.gitignore Outdated Show resolved Hide resolved
grisha87 and others added 3 commits August 3, 2023 13:54
…roduce separate artifacts for browser and nodejs runtimes

- Removing .js extensions from imports in tests
- Removing more .js extensions...
- Ported unit tests from mocha/chai to jest
- Attempt to bring Goth tests back to life
- Change way of importing child_process to fix an issue with rollup and polyfil
- Added missing jest related packages
- Increase allowed timeout for Goth to 180s
- Skipped one test, scheduled for research
- Removing newly added .js extensions
- Added TS-ignore for the lines which are affected by ts-node issue
- Updated integration tests to check with goth on GitHub Actions
- Fixed type issue in one of the tests and removed redundant await
… against goerli testnet on local machines

- Test formatting (fixup)
- Moved the ws-browser test to the test directory as it was causing issues with rollup
- Test formatting (fixup)
- Fixing the test which came from master branch (fixup)
- Fixing the test which came from master branch (fixup)
- Report gftp startup errors
- Enable manual trigger for the goth workflow
- Add debugging information to troubleshoot CI
- Fixed task.spec.file and added runInBand to goth tests
- Add debugging information to troubleshoot CI
- Fixed spawning gftp by shell
- Wait for GFTP to start properly before interacting with it
- Fix-up
- Logging update
- Start and stop Goth via global setup
- Adjusted timeouts
- Timeout data type patch
- Fixed logging in tests, added global startup timeut and brought batck import.meta.url
- Dealing with remaining integration test failures
- Added missing import
- Force exit integration tests
@grisha87 grisha87 force-pushed the feature/JST-112/drop-js-extensions-from-inport branch from c1022f3 to 4bc6167 Compare August 3, 2023 11:56
@grisha87 grisha87 marked this pull request as ready for review August 4, 2023 08:21
/examples/adv-web-example/.nuxt
Copy link
Contributor

Choose a reason for hiding this comment

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

it is not needed anymore

"test": "npm run test:unit && npm run test:integration",
"test:unit": "jest --config tests/unit/jest.config.json",
"test:integration": "jest --config tests/integration/jest.config.json tests/integration/**.spec.ts --runInBand --forceExit",
"test:integration:no-goth": "jest tests/integration/**.spec.ts --testTimeout=180000 --runInBand --forceExit",
Copy link
Contributor

Choose a reason for hiding this comment

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

timeout is defined in test/integration/jest.config.json so probably not needed here..

Copy link
Contributor

Choose a reason for hiding this comment

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

This file is to be deleted, no longer needed

@grisha87 grisha87 merged commit 1d47e96 into master Aug 7, 2023
17 checks passed
@grisha87 grisha87 deleted the feature/JST-112/drop-js-extensions-from-inport branch February 23, 2024 16:57
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