Skip to content

Commit

Permalink
nit: improve test case branching
Browse files Browse the repository at this point in the history
Signed-off-by: Ivo Yankov <[email protected]>
  • Loading branch information
Ivo-Yankov committed Jul 20, 2022
1 parent 150019c commit 464bff8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/server/tests/acceptance/rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ describe('RPC Server Acceptance Tests', function () {
it('should call eth_gasPrice', async function () {
const res = await relay.call('eth_gasPrice', []);
expect(res).to.exist;
if (process.env.LOCAL_NODE) {
if (process.env.LOCAL_NODE && process.env.LOCAL_NODE !== 'false') {
expect(res).be.equal(ethers.utils.hexValue(Assertions.defaultGasPrice));
}
else {
Expand Down Expand Up @@ -1069,7 +1069,7 @@ describe('RPC Server Acceptance Tests', function () {
});

// Only run the following tests against a local node since they only work with the genesis account
if (process.env.LOCAL_NODE) {
if (process.env.LOCAL_NODE && process.env.LOCAL_NODE !== 'false') {
describe('Gas Price related RPC endpoints', () => {
let lastBlockBeforeUpdate;
let lastBlockAfterUpdate;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/tests/helpers/assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class Assertions {
// Assert static values
expect(relayResponse.baseFeePerGas).to.exist;

if (process.env.LOCAL_NODE) {
if (process.env.LOCAL_NODE && process.env.LOCAL_NODE !== 'false') {
expect(relayResponse.baseFeePerGas).to.be.equal(ethers.utils.hexValue(this.defaultGasPrice));
}
else {
Expand Down

0 comments on commit 464bff8

Please sign in to comment.