Skip to content

Commit c24889d

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

7 files changed

Lines changed: 20 additions & 49 deletions

File tree

.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/src/test/VitestExtensions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { vi } from 'vitest';
21
import { DebugResults } from '../debugging.js';
32

43
interface Debuggable {

packages/cashscript/test/debugging.test.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
artifactTestZeroHandling,
1414
} from './fixture/debugging/debugging_contracts.js';
1515
import { sha256 } from '@cashscript/utils';
16-
import { vi } from 'vitest';
1716

1817
describe('Debugging tests', () => {
1918
describe('console.log statements', () => {
@@ -659,23 +658,21 @@ describe('Debugging tests', () => {
659658
VmTarget.BCH_SPEC,
660659
] as const;
661660

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);
661+
it.each(vmTargets)('should execute and log correctly with vmTarget %s', async (vmTarget) => {
662+
const provider = new MockNetworkProvider({ vmTarget });
663+
const contractTestLogs = new Contract(artifactTestLogs, [alicePub], { provider });
664+
const contractUtxo = randomUtxo();
665+
provider.addUtxo(contractTestLogs.address, contractUtxo);
668666

669-
const transaction = new TransactionBuilder({ provider })
670-
.addInput(contractUtxo, contractTestLogs.unlock.transfer(new SignatureTemplate(alicePriv), 1000n))
671-
.addOutput({ to: contractTestLogs.address, amount: 10000n });
667+
const transaction = new TransactionBuilder({ provider })
668+
.addInput(contractUtxo, contractTestLogs.unlock.transfer(new SignatureTemplate(alicePriv), 1000n))
669+
.addOutput({ to: contractTestLogs.address, amount: 10000n });
672670

673-
expect(transaction.getLibauthTemplate().supported[0]).toBe(vmTarget ?? 'BCH_2025_05');
671+
expect(transaction.getLibauthTemplate().supported[0]).toBe(vmTarget ?? 'BCH_2025_05');
674672

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-
}
673+
const expectedLog = new RegExp(`^\\[Input #0] Test.cash:10 0x[0-9a-f]{130} 0x${binToHex(alicePub)} 1000 0xbeef 1 test true$`);
674+
expect(transaction).toLog(expectedLog);
675+
});
679676
});
680677
});
681678

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)