Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Update sui.js to 0.49.1 (#133)
Browse files Browse the repository at this point in the history
* Update sui.js to 0.49.1 - WIP

Also remove one ref to
@mysten/sui.js/src in case that
plays a role.

Unit tests fail due to the
"fetch is not a function"
error.

* Complete upgrade to sui.js 0.49.1

The fix was to set
globals: {fetch: global.fetch} in jest.config.ts

* Update node.js.yml in workflow

Upgrade node version to 21.x

* update typescript version

* update jest  version

* update jest version to latest one

* fix tsconfig input path

* add jest-types

* removed trailing '/' character

* add more node versions in the github flow strategy matrix

* configure strategy matrix to allow 1 parallel job at max

* removing node version 18 from tests

* removing node version 20 from tests

* Fix test logic in pool-init.test.ts

* add back ci/cd testing for node version 20

---------

Co-authored-by: Theodore Chaikalis <[email protected]>
  • Loading branch information
Tzal3x and teohaik authored Jan 16, 2024
1 parent 4c3644c commit b687483
Show file tree
Hide file tree
Showing 7 changed files with 1,178 additions and 3,385 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ jobs:
runs-on: ubuntu-latest

strategy:
max-parallel: 1
matrix:
node-version: [18.x]
node-version: [20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Running tests with Node.js ver ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
Expand Down
3 changes: 3 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
export default {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/**/*.test.ts'],
testTimeout: 120000, // 10000 ms = 10 seconds
globals: { fetch: global.fetch },
transform: {
'^.+\\.tsx?$': [
'ts-jest',
Expand Down
Loading

0 comments on commit b687483

Please sign in to comment.