@@ -0,0 +1,8 @@
+{
+ "node-option": ["import=tsx"],
+ "extensions": ["ts"],
+ "timeout": 1000000,
+ "spec": [
+ "tests/**/*.ts"
+ ]
+}
@@ -6,4 +6,4 @@ cluster = "localnet"
wallet = "~/.config/solana/id.json"
[scripts]
-test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
+test = "yarn run mocha"
@@ -2,3 +2,6 @@
members = [
"programs/*"
]
+
+[profile.release]
+overflow-checks = true
@@ -1,14 +1,14 @@
{
+ "type": "module",
"dependencies": {
- "@project-serum/anchor": "0.24.1"
+ "@coral-xyz/anchor": "^0.30.1"
},
"devDependencies": {
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
- "chai": "^4.3.4",
- "chai-as-promised": "^7.1.1",
- "mocha": "9.2.2",
- "ts-mocha": "^8.0.0",
+ "chai": "^5.1.1",
+ "mocha": "^10.7.0",
+ "tsx": "^4.16.2",
"typescript": "^4.3.5"
}
@@ -9,11 +9,12 @@ crate-type = ["cdylib", "lib"]
name = "tic_tac_toe"
[features]
+default = []
+cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
-cpi = ["no-entrypoint"]
-default = []
+idl-build = ["anchor-lang/idl-build"]
[dependencies]
anchor-lang = "=0.30.1"
@@ -1,10 +1,7 @@
-import * as anchor from '@project-serum/anchor';
-import { AnchorError, Program } from '@project-serum/anchor';
+import * as anchor from "@coral-xyz/anchor";
+import { AnchorError, type Program } from "@coral-xyz/anchor";
import { TicTacToe } from '../target/types/tic_tac_toe';
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
import { expect } from 'chai';
-chai.use(chaiAsPromised);
async function play(program: Program<TicTacToe>, game, player, tile, expectedTurn, expectedGameState, expectedBoard) {
await program.methods
@@ -1,10 +1,11 @@
"compilerOptions": {
- "types": ["mocha", "chai"],
- "typeRoots": ["./node_modules/@types"],
- "lib": ["es2015"],
- "module": "commonjs",
- "target": "es6",
- "esModuleInterop": true
- }
+ "lib": ["ESNext"],
+ "module": "ESNext",
+ "target": "ESNext",
+ "moduleResolution": "Node",
+ "esModuleInterop": true,
+ },
+ "include": ["**/*.ts"],
+ "exclude": ["node_modules"]