Skip to content

Commit

Permalink
test: repair tests not running for LSP7 and LSP8
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Oct 18, 2024
1 parent 6b2b24b commit f6d132a
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/lsp-smart-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"lint": "eslint . --ext .ts,.js",
"lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",
"package": "hardhat prepare-package",
"test": "hardhat test --no-compile tests/**/*.test.ts",
"test": "hardhat test --no-compile tests/**/*.test.ts tests/LSP7DigitalAsset/**/*.ts tests/LSP8IdentifiableDigitalAsset/**/*.ts",
"test:foundry": "FOUNDRY_PROFILE=lsp_smart_contracts forge test --no-match-test Skip -vvv",
"test:coverage": "hardhat coverage",
"test:benchmark": "hardhat test --no-compile tests/Benchmark.test.ts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ERC725YDataKeys } from '../../../../constants';
import { OPERATION_TYPES } from '@lukso/lsp0-contracts';
import { PERMISSIONS } from '@lukso/lsp6-contracts';

import { LSP6KeyManager, LSP6KeyManager__factory } from '../../types';
import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../../types';

// setup
import { LSP6TestContext } from '../../../utils/context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from 'chai';
import { ethers } from 'hardhat';
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';

import { TargetContract, TargetContract__factory } from '../../types';
import { TargetContract, TargetContract__factory } from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
LSP7Mintable__factory,
LSP8Mintable,
LSP8Mintable__factory,
} from '../../types';
} from '../../../../types';

// constants
import { ERC725YDataKeys, INTERFACE_IDS } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
LSP7Mintable__factory,
UniversalProfile,
UniversalProfile__factory,
} from '../../types';
} from '../../../../types';

// constants
import { ERC725YDataKeys, INTERFACE_IDS } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
LSP7MintableInit,
LSP7MintableInit__factory,
LSP7Mintable__factory,
} from '../../types';
} from '../../../../types';

export const shouldBehaveLikeBatchExecute = (
buildContext: (initialFunding?: bigint) => Promise<LSP6TestContext>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';

import { TargetContract__factory, TargetContract } from '../../types';
import { TargetContract__factory, TargetContract } from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
FallbackRevert__factory,
TargetContract,
TargetContract__factory,
} from '../../types';
} from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';

import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../types';
import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ethers } from 'hardhat';
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { calculateCreate2 } from 'eth-create2-calculator';

import { TargetContract__factory } from '../../types';
import { TargetContract__factory } from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';

import { TargetContract, TargetContract__factory } from '../../types';
import { TargetContract, TargetContract__factory } from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
UniversalProfile,
FallbackContract__factory,
FallbackContract,
} from '../../types';
} from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TargetContract,
TargetContract__factory,
UniversalReceiverDelegateDataUpdater__factory,
} from '../../types';
} from '../../../../types';

// constants
import { ERC725YDataKeys, LSP1_TYPE_IDS } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ethers } from 'hardhat';
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
import { encodeData, ERC725JSONSchema } from '@erc725/erc725.js';

import { ExecutorLSP20, ExecutorLSP20__factory } from '../../types';
import { ExecutorLSP20, ExecutorLSP20__factory } from '../../../../types';

// constants
import { ERC725YDataKeys } from '../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ERC725YDataKeys, INTERFACE_IDS, LSP1_TYPE_IDS, SupportedStandards } fro

import { abiCoder } from '../utils/helpers';
import { AddressZero } from '../LSP17Extensions/helpers/utils';
import { build } from 'unbuild';

export type LSP7TestAccounts = {
owner: SignerWithAddress;
Expand Down Expand Up @@ -444,8 +445,8 @@ export const shouldBehaveLikeLSP7 = (buildContext: () => Promise<LSP7TestContext
});

describe('when `operator` param is the zero address', () => {
const tokenOwner = context.accounts.owner.address;
it('should revert', async () => {
const tokenOwner = context.accounts.owner.address;
const subtractedAmount = toBigInt(1);

await expect(
Expand Down

0 comments on commit f6d132a

Please sign in to comment.