From b6675ff720d31152117e89146cb319a6fc505762 Mon Sep 17 00:00:00 2001 From: Nikolay Dorofeev Date: Sun, 12 Nov 2023 09:45:32 +0400 Subject: [PATCH] Leave only one test --- contracts/tests/DSocialNetworkAccount.spec.ts | 43 ----------- contracts/tests/DSocialNetworkMaster.spec.ts | 71 +++++++++---------- contracts/tests/DSocialNetworkPost.spec.ts | 43 ----------- 3 files changed, 35 insertions(+), 122 deletions(-) delete mode 100644 contracts/tests/DSocialNetworkAccount.spec.ts delete mode 100644 contracts/tests/DSocialNetworkPost.spec.ts diff --git a/contracts/tests/DSocialNetworkAccount.spec.ts b/contracts/tests/DSocialNetworkAccount.spec.ts deleted file mode 100644 index 28180ee5..00000000 --- a/contracts/tests/DSocialNetworkAccount.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -// TODO: fix tests -// import { Blockchain, SandboxContract } from '@ton-community/sandbox' -// import { toNano } from 'ton-core' -// import { DSocialNetworkAccount } from '../wrappers/DSocialNetworkAccount' -// import '@ton-community/test-utils' - -// describe('DSocialNetworkAccount', () => { -// let blockchain: Blockchain -// let dSocialNetworkAccount: SandboxContract - -// beforeEach(async () => { -// blockchain = await Blockchain.create() - -// dSocialNetworkAccount = blockchain.openContract( -// await DSocialNetworkAccount.fromInit() -// ) - -// const deployer = await blockchain.treasury('deployer') - -// const deployResult = await dSocialNetworkAccount.send( -// deployer.getSender(), -// { -// value: toNano('0.05') -// }, -// { -// $$type: 'Deploy', -// queryId: 0n -// } -// ) - -// expect(deployResult.transactions).toHaveTransaction({ -// from: deployer.address, -// to: dSocialNetworkAccount.address, -// deploy: true, -// success: true -// }) -// }) - -// it('should deploy', async () => { -// // the check is done inside beforeEach -// // blockchain and dSocialNetworkAccount are ready to use -// }) -// }) diff --git a/contracts/tests/DSocialNetworkMaster.spec.ts b/contracts/tests/DSocialNetworkMaster.spec.ts index 2a2d782c..d0d87bcf 100644 --- a/contracts/tests/DSocialNetworkMaster.spec.ts +++ b/contracts/tests/DSocialNetworkMaster.spec.ts @@ -1,43 +1,42 @@ -// TODO: fix tests -// import { Blockchain, SandboxContract } from '@ton-community/sandbox' -// import { toNano } from 'ton-core' -// import { DSocialNetworkMaster } from '../wrappers/DSocialNetworkMaster' -// import '@ton-community/test-utils' +import { Blockchain, SandboxContract } from '@ton-community/sandbox' +import { toNano } from 'ton-core' +import { DSocialNetworkMaster } from '../wrappers/DSocialNetworkMaster' +import '@ton-community/test-utils' -// describe('DSocialNetworkMaster', () => { -// let blockchain: Blockchain -// let dSocialNetworkMaster: SandboxContract +describe('DSocialNetworkMaster', () => { + let blockchain: Blockchain + let dSocialNetworkMaster: SandboxContract -// beforeEach(async () => { -// blockchain = await Blockchain.create() + beforeEach(async () => { + blockchain = await Blockchain.create() -// dSocialNetworkMaster = blockchain.openContract( -// await DSocialNetworkMaster.fromInit() -// ) + dSocialNetworkMaster = blockchain.openContract( + await DSocialNetworkMaster.fromInit() + ) -// const deployer = await blockchain.treasury('deployer') + const deployer = await blockchain.treasury('deployer') -// const deployResult = await dSocialNetworkMaster.send( -// deployer.getSender(), -// { -// value: toNano('0.05') -// }, -// { -// $$type: 'Deploy', -// queryId: 0n -// } -// ) + const deployResult = await dSocialNetworkMaster.send( + deployer.getSender(), + { + value: toNano('0.05') + }, + { + $$type: 'Deploy', + queryId: 0n + } + ) -// expect(deployResult.transactions).toHaveTransaction({ -// from: deployer.address, -// to: dSocialNetworkMaster.address, -// deploy: true, -// success: true -// }) -// }) + expect(deployResult.transactions).toHaveTransaction({ + from: deployer.address, + to: dSocialNetworkMaster.address, + deploy: true, + success: true + }) + }) -// it('should deploy', async () => { -// // the check is done inside beforeEach -// // blockchain and dSocialNetworkMaster are ready to use -// }) -// }) + it('should deploy', async () => { + // the check is done inside beforeEach + // blockchain and dSocialNetworkMaster are ready to use + }) +}) diff --git a/contracts/tests/DSocialNetworkPost.spec.ts b/contracts/tests/DSocialNetworkPost.spec.ts deleted file mode 100644 index d6a1caf4..00000000 --- a/contracts/tests/DSocialNetworkPost.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -// TODO: fix tests -// import { Blockchain, SandboxContract } from '@ton-community/sandbox' -// import { toNano } from 'ton-core' -// import { DSocialNetworkPost } from '../wrappers/DSocialNetworkPost' -// import '@ton-community/test-utils' - -// describe('DSocialNetworkPost', () => { -// let blockchain: Blockchain -// let dSocialNetworkPost: SandboxContract - -// beforeEach(async () => { -// blockchain = await Blockchain.create() - -// dSocialNetworkPost = blockchain.openContract( -// await DSocialNetworkPost.fromInit() -// ) - -// const deployer = await blockchain.treasury('deployer') - -// const deployResult = await dSocialNetworkPost.send( -// deployer.getSender(), -// { -// value: toNano('0.05') -// }, -// { -// $$type: 'Deploy', -// queryId: 0n -// } -// ) - -// expect(deployResult.transactions).toHaveTransaction({ -// from: deployer.address, -// to: dSocialNetworkPost.address, -// deploy: true, -// success: true -// }) -// }) - -// it('should deploy', async () => { -// // the check is done inside beforeEach -// // blockchain and dSocialNetworkPost are ready to use -// }) -// })