-
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
Apr 13, 2023
1 parent
dadfc99
commit 1d00e7a
Showing
6 changed files
with
442 additions
and
19 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
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,20 @@ | ||
import AElf from '../../src/index'; | ||
const stageEndpoint = 'https://explorer-test-tdvw.aelf.io/chain'; | ||
describe('test AElf', () => { | ||
test('test AElf is connected', () => { | ||
const aelf = new AElf(new AElf.providers.HttpProvider(stageEndpoint)); | ||
const result = aelf.isConnected(); | ||
expect(result).toBeTruthy(); | ||
}); | ||
// test('test AElf reset',() => { | ||
// const aelf = new AElf(new AElf.providers.HttpProvider(stageEndpoint)); | ||
// aelf.reset(); | ||
// }); | ||
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); | ||
}); | ||
}); |
Oops, something went wrong.