Skip to content

Commit 598ae62

Browse files
committed
fix: seeCoupon tests
Signed-off-by: Luigi Navarro <[email protected]>
1 parent 914428d commit 598ae62

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

apps/ats/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "Apache-2.0",
55
"scripts": {
66
"build": "tsc && vite build",
7-
"test": "NODE_ENV=test jest --runInBand",
7+
"test": "NODE_OPTIONS='--max-old-space-size=8192' NODE_ENV=test jest --runInBand",
88
"test:ci": "NODE_ENV=test jest --ci --runInBand",
99
"clean": "npx --yes npm-run-all --parallel clean:node clean:build",
1010
"dev": "vite",

apps/ats/web/src/views/DigitalSecurityDetails/Components/Coupons/__tests__/SeeCoupon.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ const mockCouponsForData = {
3232
};
3333

3434
const mockCouponsData = {
35+
couponId: 1,
3536
executionDate: new Date("2024-06-15T10:00:00Z"),
37+
startDate: new Date("2024-01-01T00:00:00Z"),
38+
endDate: new Date("2024-06-15T10:00:00Z"),
39+
fixingDate: new Date("2024-06-15T10:00:00Z"),
40+
recordDate: new Date("2024-01-01T00:00:00Z"),
41+
rate: "5.01",
42+
rateDecimals: 2,
43+
rateStatus: 1,
3644
};
3745

3846
const mockCouponsAmountForData = {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"ats:contracts:format:check": "npm run format:check --workspace=packages/ats/contracts",
7070
"ats:contracts:lint": "npm run lint --workspace=packages/ats/contracts",
7171
"ats:contracts:lint:fix": "npm run lint:fix --workspace=packages/ats/contracts",
72-
"ats:contracts:build": "npm run build --workspace=packages/ats/contracts",
72+
"ats:contracts:build": "NODE_OPTIONS='--max-old-space-size=8192' npm run build --workspace=packages/ats/contracts",
7373
"ats:contracts:compile": "npm run compile --workspace=packages/ats/contracts",
7474
"ats:contracts:test": "npm run test --workspace=packages/ats/contracts",
7575
"ats:contracts:test:parallel": "npm run test:parallel --workspace=packages/ats/contracts",
@@ -95,7 +95,7 @@
9595
"ats:sdk:clean": "npm run clean --workspace=packages/ats/sdk",
9696
"ats:sdk:publish": "npm run publish --workspace=packages/ats/sdk",
9797
"ats:web:build": "npm run build --workspace=apps/ats/web",
98-
"ats:web:test": "npm run test --workspace=apps/ats/web",
98+
"ats:web:test": "NODE_OPTIONS='--max-old-space-size=8192' npm run test --workspace=apps/ats/web",
9999
"ats:web:test:update": "npm run test:update --workspace=apps/ats/web",
100100
"ats:web:test:ci": "npm run test:ci --workspace=apps/ats/web",
101101
"ats:web:dev": "npm run dev --workspace=apps/ats/web",

packages/ats/contracts/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"author": "",
4646
"license": "Apache-2.0",
4747
"scripts": {
48-
"build": "node -e \"const fs=require('fs'); fs.rmSync('build',{recursive:true,force:true})\" && npm run compile && npx tsc -p tsconfig.build.json && npx tsc-alias -p tsconfig.build.json",
48+
"build": "NODE_OPTIONS='--max-old-space-size=8192' node -e \"const fs=require('fs'); fs.rmSync('build',{recursive:true,force:true})\" && npm run compile && npx tsc -p tsconfig.build.json && npx tsc-alias -p tsconfig.build.json",
4949
"clean": "npm run clean:build",
5050
"clean:build": "node -e \"const fs=require('fs'); ['dist','build','artifacts','cache','typechain-types','coverage','.nyc_output'].forEach(d=>fs.rmSync(d,{recursive:true,force:true}))\"",
5151
"clean:deps": "node -e \"const fs=require('fs'); fs.rmSync('node_modules',{recursive:true,force:true})\"",
@@ -67,10 +67,10 @@
6767
"deploy:hedera:mainnet": "NETWORK=hedera-mainnet npm run deploy",
6868
"local:hardhat": "npx hardhat node",
6969
"deploy:hardhat": "npx hardhat run scripts/cli/hardhat.ts",
70-
"compile": "npx hardhat compile",
71-
"compile:traces": "npx hardhat --show-stack-traces compile",
72-
"compile:force": "npx hardhat compile --force",
73-
"compile:forceBuild": "npx hardhat compile --force && npm run build",
70+
"compile": "NODE_OPTIONS='--max-old-space-size=8192' npx hardhat compile",
71+
"compile:traces": "NODE_OPTIONS='--max-old-space-size=8192' npx hardhat --show-stack-traces compile",
72+
"compile:force": "NODE_OPTIONS='--max-old-space-size=8192' npx hardhat compile --force",
73+
"compile:forceBuild": "NODE_OPTIONS='--max-old-space-size=8192' npx hardhat compile --force && npm run build",
7474
"typechain": "npx hardhat typechain",
7575
"clean:cache": "npx hardhat clean",
7676
"test": "bash -c 'npx hardhat test $(find test/contracts/unit test/scripts/unit test/scripts/integration -name \"*.test.ts\")'",

0 commit comments

Comments
 (0)