Skip to content

Commit 65c89b0

Browse files
committed
Remove some final jest references
1 parent d1c96f4 commit 65c89b0

File tree

6 files changed

+23
-50
lines changed

6 files changed

+23
-50
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ module.exports = {
1111
sourceType: 'module', // Allows for the use of imports
1212
extraFileExtensions: ['.cjs'],
1313
},
14-
env: {
15-
'jest': true,
16-
},
1714
rules: {
1815
'max-len': ['error', { code: 125, ignoreStrings: true, ignoreTemplateLiterals: true }],
1916
'import/no-cycle': 0, // Needed for AST -> AstVisitor -> AST

jest/log-on-fail-reporter.cjs

Lines changed: 0 additions & 23 deletions
This file was deleted.

jest/summary-reporter.cjs

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"examples/testing-suite"
99
],
1010
"devDependencies": {
11-
"@jest/reporters": "^26.6.2",
12-
"@types/jest": "^29.5.14",
1311
"@types/node": "^22.17.0",
1412
"@typescript-eslint/eslint-plugin": "^7.0.0",
1513
"@typescript-eslint/parser": "^7.0.0",

packages/cashscript/test/debugging.test.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -659,23 +659,21 @@ describe('Debugging tests', () => {
659659
VmTarget.BCH_SPEC,
660660
] as const;
661661

662-
for (const vmTarget of vmTargets) {
663-
it(`should execute and log correctly with vmTarget ${vmTarget}`, async () => {
664-
const provider = new MockNetworkProvider({ vmTarget });
665-
const contractTestLogs = new Contract(artifactTestLogs, [alicePub], { provider });
666-
const contractUtxo = randomUtxo();
667-
provider.addUtxo(contractTestLogs.address, contractUtxo);
668-
669-
const transaction = new TransactionBuilder({ provider })
670-
.addInput(contractUtxo, contractTestLogs.unlock.transfer(new SignatureTemplate(alicePriv), 1000n))
671-
.addOutput({ to: contractTestLogs.address, amount: 10000n });
672-
673-
expect(transaction.getLibauthTemplate().supported[0]).toBe(vmTarget ?? 'BCH_2025_05');
674-
675-
const expectedLog = new RegExp(`^\\[Input #0] Test.cash:10 0x[0-9a-f]{130} 0x${binToHex(alicePub)} 1000 0xbeef 1 test true$`);
676-
expect(transaction).toLog(expectedLog);
677-
});
678-
}
662+
it.each(vmTargets)('should execute and log correctly with vmTarget %s', async (vmTarget) => {
663+
const provider = new MockNetworkProvider({ vmTarget });
664+
const contractTestLogs = new Contract(artifactTestLogs, [alicePub], { provider });
665+
const contractUtxo = randomUtxo();
666+
provider.addUtxo(contractTestLogs.address, contractUtxo);
667+
668+
const transaction = new TransactionBuilder({ provider })
669+
.addInput(contractUtxo, contractTestLogs.unlock.transfer(new SignatureTemplate(alicePriv), 1000n))
670+
.addOutput({ to: contractTestLogs.address, amount: 10000n });
671+
672+
expect(transaction.getLibauthTemplate().supported[0]).toBe(vmTarget ?? 'BCH_2025_05');
673+
674+
const expectedLog = new RegExp(`^\\[Input #0] Test.cash:10 0x[0-9a-f]{130} 0x${binToHex(alicePub)} 1000 0xbeef 1 test true$`);
675+
expect(transaction).toLog(expectedLog);
676+
});
679677
});
680678
});
681679

tsconfig.build.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
"target": "es2021",
44
"module": "esnext",
55
"declaration": true,
6-
"lib": ["es2021", "dom"],
7-
"types": ["node", "jest"],
6+
"lib": [
7+
"es2021",
8+
"dom"
9+
],
10+
"types": [
11+
"node",
12+
"vitest/globals"
13+
],
814
"sourceMap": true,
915
"strict": true,
1016
"strictPropertyInitialization": false,

0 commit comments

Comments
 (0)