-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
AbigailDeng
authored and
AbigailDeng
committed
Aug 21, 2024
1 parent
a921109
commit f75be64
Showing
15 changed files
with
567 additions
and
823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const aelfEndPoint = 'https://aelf-test-node.aelf.io'; | ||
export const tdvwEndPoint = 'https://tdvw-test-node.aelf.io'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import AElf from '../../src/index'; | ||
const stageEndpoint = 'https://tdvw-test-node.aelf.io'; | ||
import { aelfEndPoint, tdvwEndPoint } from './constant'; | ||
describe('test AElf', () => { | ||
test('test AElf is connected', () => { | ||
const aelf = new AElf(new AElf.providers.HttpProvider(stageEndpoint)); | ||
const aelf = new AElf(new AElf.providers.HttpProvider(tdvwEndPoint)); | ||
const result = aelf.isConnected(); | ||
expect(result).toBeTruthy(); | ||
}); | ||
test('test AElf set provider', () => { | ||
const aelf = new AElf( | ||
new AElf.providers.HttpProvider('https://aelf-public-node.aelf.io') | ||
); | ||
aelf.setProvider(new AElf.providers.HttpProvider(stageEndpoint)); | ||
expect(aelf.currentProvider.host).toEqual(stageEndpoint); | ||
const aelf = new AElf(new AElf.providers.HttpProvider(aelfEndPoint)); | ||
aelf.setProvider(new AElf.providers.HttpProvider(tdvwEndPoint)); | ||
expect(aelf.currentProvider.host).toEqual(tdvwEndPoint); | ||
}); | ||
}); |
Oops, something went wrong.