Skip to content

Commit

Permalink
"Refactor stableCoinFactory test code"
Browse files Browse the repository at this point in the history
The codes for 'stableCoinFactory' test have been refactored for readability and maintainability. The refactor involves rearranging the existing codes into more proper structured blocks. No new functionalities were added, and existing functionalities were neither removed nor modified.

Signed-off-by: Marcos Serradilla Diez <[email protected]>
  • Loading branch information
marcosio committed Jan 22, 2024
1 parent c2e96a8 commit 196f2bb
Show file tree
Hide file tree
Showing 8 changed files with 1,221 additions and 1,250 deletions.
8 changes: 4 additions & 4 deletions contracts/test/burnable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const expect = chai.expect
let proxyAddress: ContractId

export const burnable = (proxyAddresses: ContractId[]) => {
before(() => {
proxyAddress = proxyAddresses[0]
})

describe('Burn Tests', function () {
before(() => {
proxyAddress = proxyAddresses[0]
})

it('Admin account can grant and revoke burnable role to an account', async function () {
// Admin grants burn role : success
let result = await hasRole(
Expand Down
8 changes: 4 additions & 4 deletions contracts/test/deletable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ const expect = chai.expect
let proxyAddress: ContractId

export const deletable = (proxyAddresses: ContractId[]) => {
before(() => {
proxyAddress = proxyAddresses[0]
})

describe('Delete Tests', () => {
before(() => {
proxyAddress = proxyAddresses[0]
})

it('Admin account can grant and revoke delete role to an account', async function () {
// Admin grants delete role : success
let result = await hasRole(
Expand Down
7 changes: 4 additions & 3 deletions contracts/test/freezable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ const expect = chai.expect
let proxyAddress: ContractId

export const freezable = (proxyAddresses: ContractId[]) => {
before(() => {
proxyAddress = proxyAddresses[0]
})
describe('Freeze Tests', function () {
before(() => {
proxyAddress = proxyAddresses[0]
})

it('Admin account can grant and revoke freeze role to an account', async function () {
// Admin grants freeze role : success
let result = await hasRole(
Expand Down
10 changes: 5 additions & 5 deletions contracts/test/pausable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ let proxyAddress: ContractId
let token: ContractId

export const pausable = (proxyAddresses: ContractId[]) => {
before(() => {
proxyAddress = proxyAddresses[0]
token = proxyAddresses[8]
})

describe('Pause Tests', () => {
before(() => {
proxyAddress = proxyAddresses[0]
token = proxyAddresses[8]
})

it('Admin account can grant and revoke pause role to an account', async function () {
// Admin grants pause role : success
let result = await hasRole(
Expand Down
Loading

0 comments on commit 196f2bb

Please sign in to comment.