Skip to content

Commit

Permalink
test: conditionally run tests based on TW_SECRET_KEY (#4636)
Browse files Browse the repository at this point in the history
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a conditional test runner based on the environment variable `TW_SECRET_KEY` to the test suite for ERC721, MintableERC20, MintableERC721, and MintableERC1155 modules.

### Detailed summary
- Modified test descriptions to include conditional test execution based on `TW_SECRET_KEY` environment variable.
- Updated test suite for ERC721, MintableERC20, MintableERC721, and MintableERC1155 modules to run tests conditionally.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
  • Loading branch information
joaquim-verges committed Sep 16, 2024
1 parent 85ddb17 commit a5e605c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const realNFTs = [
},
];

describe("createAndReveal", () => {
describe.runIf(process.env.TW_SECRET_KEY)("createAndReveal", () => {
let contract: ThirdwebContract;
beforeAll(async () => {
const address = await deployERC721Contract({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { getInstalledModules } from "../__generated__/IModularCore/read/getInsta
import { grantMinterRole } from "../common/grantMinterRole.js";
import * as MintableERC1155 from "./index.js";

describe("ModularTokenERC1155", () => {
describe.runIf(process.env.TW_SECRET_KEY)("ModularTokenERC1155", () => {
let contract: ThirdwebContract;
beforeAll(async () => {
const address = await deployModularContract({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getInstalledModules } from "../__generated__/IModularCore/read/getInsta
import { grantMinterRole } from "../common/grantMinterRole.js";
import * as MintableERC20 from "./index.js";

describe("ModularTokenERC20", () => {
describe.runIf(process.env.TW_SECRET_KEY)("ModularTokenERC20", () => {
let contract: ThirdwebContract;
beforeAll(async () => {
const address = await deployModularContract({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getInstalledModules } from "../__generated__/IModularCore/read/getInsta
import { grantMinterRole } from "../common/grantMinterRole.js";
import * as MintableERC721 from "./index.js";

describe("ModularTokenERC721", () => {
describe.runIf(process.env.TW_SECRET_KEY)("ModularTokenERC721", () => {
let contract: ThirdwebContract;
beforeAll(async () => {
const address = await deployModularContract({
Expand Down

0 comments on commit a5e605c

Please sign in to comment.