Skip to content

Commit

Permalink
🐛 fix bug due to this.skip()
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboudjem committed Nov 8, 2023
1 parent f3352f8 commit 754df1b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,13 @@ describe("Biconomy Token Paymaster (with Bundler)", function () {

after(async function () {
const chainId = (await ethers.provider.getNetwork()).chainId;
if (chainId !== BundlerTestEnvironment.BUNDLER_ENVIRONMENT_CHAIN_ID) {
this.skip();
if (chainId === BundlerTestEnvironment.BUNDLER_ENVIRONMENT_CHAIN_ID) {
await Promise.all([
environment.revert(environment.defaultSnapshot!),
environment.resetBundler(),
]);
}

await Promise.all([
environment.revert(environment.defaultSnapshot!),
environment.resetBundler(),
]);
});
});

describe("Token Payamster functionality: positive test", () => {
it("succeed with valid signature and valid erc20 pre approval for allowed ERC20 token: Deployed account", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,12 @@ describe("Biconomy Token Paymaster (with Bundler)", function () {

after(async function () {
const chainId = (await ethers.provider.getNetwork()).chainId;
if (chainId !== BundlerTestEnvironment.BUNDLER_ENVIRONMENT_CHAIN_ID) {
this.skip();
if (chainId === BundlerTestEnvironment.BUNDLER_ENVIRONMENT_CHAIN_ID) {
await Promise.all([
environment.revert(environment.defaultSnapshot!),
environment.resetBundler(),
]);
}

await Promise.all([
environment.revert(environment.defaultSnapshot!),
environment.resetBundler(),
]);
});

describe("Token Payamster functionality: positive test", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,12 @@ describe("Biconomy Token Paymaster (With Bundler)", function () {

after(async function () {
const chainId = (await ethers.provider.getNetwork()).chainId;
if (chainId !== BundlerTestEnvironment.BUNDLER_ENVIRONMENT_CHAIN_ID) {
this.skip();
if (chainId === BundlerTestEnvironment.BUNDLER_ENVIRONMENT_CHAIN_ID) {
await Promise.all([
environment.revert(environment.defaultSnapshot!),
environment.resetBundler(),
]);
}

await Promise.all([
environment.revert(environment.defaultSnapshot!),
environment.resetBundler(),
]);
});

describe("Token Paymaster with good and bad oracle aggregator", () => {
Expand Down

0 comments on commit 754df1b

Please sign in to comment.