How to use the @oclif/test.test.timeout 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 / commands / init.spec.ts View on Github external
test
    .stdout()
    .command(['init', '-n', 'sample'])
    .it(
      'must be able to successfully create folders with name.',
      (ctx): void => {
        const path = join(__dirname, '..', '..', `/sample`);
        rimraf(path, (): void => {});
        expect(ctx.stdout).to.equal(
          'henesis initialization has been completed.\n',
        );
      },
    );

  test
    .timeout(20000)
    .stdout()
    .command([
      'init',
      '-g',
      'https://github.com/HAECHI-LABS/henesis-cryptokitties-klaytn.git',
    ])
    .it(
      'should be able to successfully create folders with git template',
      (ctx): void => {
        const path = join(
          __dirname,
          '..',
          '..',
          `/henesis-cryptokitties-klaytn`,
        );
github HAECHI-LABS / henesis-cli / src / commands / integration / deploy.spec.ts View on Github external
async (): Promise => {
      const res = newMockIntegration();
      test
        .timeout(10000)
        .nock(
          'http://localhost:8080',
          (api): Scope => api.post('/integrations/v1').reply(200, res),
        )
        .stub(utils, 'startWait', (): void => {})
        .stub(utils, 'endWait', (): void => {})
        .stdout()
        .command([`integration:deploy`])
        .it(
          'should deploy a integration with default spec path',
          (ctx): void => {
            expect(ctx.stdout).to.equal(
              `${res.integrationId} has been deployed\n`,
            );
          },

@oclif/test

test helpers for oclif components

MIT
Latest version published 19 days ago

Package Health Score

86 / 100
Full package analysis