Skip to content

Commit 5a15038

Browse files
test: added integration and unit testing for acpContractClientV2 (#113)
* test: added unit testing for acpContractClientV2 - installed and configured jest and babel for test environment - created unit testing scripts for acpContractClientV2 * test: completed unit tests for acpContractClientV2.ts - removed previous helper file under test/ - updated ES2016 to ES2020 for usage of BigInt - updated vp sdk to latest version * test: completed integration tests for acpContractClientV2 - added the standard env.ts file to load variables * fix: added README.md and .env.sample
1 parent 2fb9211 commit 5a15038

10 files changed

Lines changed: 9171 additions & 2256 deletions

babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/preset-env', { targets: { node: 'current' } }],
4+
'@babel/preset-typescript',
5+
],
6+
};

jest.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
testEnvironment: 'node',
3+
roots: ['<rootDir>/test'],
4+
testMatch: ['**/*.test.ts'],
5+
collectCoverageFrom: [
6+
'src/**/*.ts',
7+
'!src/**/*.d.ts',
8+
'!src/index.ts',
9+
],
10+
coverageDirectory: 'coverage',
11+
coverageReporters: ['text', 'lcov', 'html'],
12+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
13+
transform: {
14+
'^.+\\.(ts|tsx|js|jsx)$': 'babel-jest',
15+
},
16+
transformIgnorePatterns: [
17+
'node_modules/(?!(@account-kit|@aa-sdk|viem|socket\\.io-client)/)',
18+
],
19+
moduleNameMapper: {
20+
'^(\\.{1,2}/.*)\\.js$': '$1',
21+
},
22+
// Force exit after tests complete (needed because AcpClient maintains persistent connections)
23+
forceExit: true,
24+
};

0 commit comments

Comments
 (0)