How to use the @oclif/test.expect function in @oclif/test

To help you get started, we’ve selected a few @oclif/test examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HAECHI-LABS / henesis-cli / src / compiler / solc.spec.ts View on Github external
it('should compile solidity code', async () => {
      const path = __dirname + '/../../templates/contracts/example.sol';
      const result: CompileResult = await compileSol(path, ({
        solcVersion: '0.5.8',
      } as any) as Option);
      expect(result.contracts).to.not.equal(undefined);
      expect(result.sources).to.not.equal(undefined);
    }).timeout(10000);
github HAECHI-LABS / henesis-cli / src / commands / integration / describe.spec.ts View on Github external
.it('describe a integration', (ctx): void => {
        expect(ctx.stdout).to.equal(
          JSON.stringify(integration, undefined, 2) + '\n',
        );
      });
  });
github HAECHI-LABS / henesis-cli / src / commands / integration / deploy.spec.ts View on Github external
.it('should deploy a integration with update option', (ctx): void => {
          expect(ctx.stdout).to.equal(
            `${res.integrationId} has been deployed with force\n`,
          );
        });
    },
github HAECHI-LABS / henesis-cli / src / commands / config.spec.ts View on Github external
.it('should be success to change https url', (ctx): void => {
      expect(ctx.stdout).to.equal('Successfully set to https://asdf\n');
      expect(configstore.get('endpoint')).to.equal('https://asdf');
    });
github HAECHI-LABS / henesis-cli / src / compiler / solc.spec.ts View on Github external
it('should compile solidity code', async () => {
      const path = __dirname + '/../../templates/contracts/example.sol';
      const result: CompileResult = await compileSol(path, ({
        solcVersion: '0.5.8',
      } as any) as Option);
      expect(result.contracts).to.not.equal(undefined);
      expect(result.sources).to.not.equal(undefined);
    }).timeout(10000);
github HAECHI-LABS / henesis-cli / src / rpc / integration.spec.ts View on Github external
it('should throw invalid response format error', async () => {
      const invalidJson = { invalid: 'error' };
      await mockServer.get('/integrations/v1').thenJSON(200, invalidJson);
      try {
        await integrationRpc.getIntegrations();
      } catch (err) {
        expect(err.toString()).to.equal(
          'Error: Expected getIntegrationsList to return an array but it returned [object Object]',
        );
      }
    });
  });
github HAECHI-LABS / henesis-cli / src / commands / integration / delete.spec.ts View on Github external
.it('delete a integration', (ctx): void => {
        expect(ctx.stdout).to.equal(`${id} has been deleted\n`);
      });
  });
github HAECHI-LABS / henesis-cli / src / rpc / integration.spec.ts View on Github external
it('should delete a integration', async () => {
      const integration = newMockIntegration();
      await mockServer
        .delete('/integrations/v1/' + integration.integrationId)
        .thenReply(200, undefined);
      const response = await integrationRpc.deleteIntegration(
        integration.integrationId,
      );
      expect(response).to.deep.equal(null);
    });
  });
github HAECHI-LABS / henesis-cli / src / commands / login.spec.ts View on Github external
.it('should be already login with message', (ctx): void => {
      expect(ctx.stdout).to.equal(
        'You are already logged in as yoonsung@haechi.io\n',
      );
    });
github HAECHI-LABS / henesis-cli / src / commands / init.spec.ts View on Github external
(ctx): void => {
        expect(ctx.stdout).to.equal(
          'henesis initialization has been completed.\nhenesis initialization has been completed.\n',
        );
      },
    );

@oclif/test

test helpers for oclif components

MIT
Latest version published 19 days ago

Package Health Score

86 / 100
Full package analysis