How to use the @flood/element-api.TestEvent.BeforeStep function in @flood/element-api

To help you get started, we’ve selected a few @flood/element-api 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 flood-io / element / packages / cli / src / utils / ConsoleReporter.ts View on Github external
testLifecycle(stage: TestEvent, label: string): void {
		switch (stage) {
			case TestEvent.AfterStepAction:
				this.logger.info(`---> ${label}()`)
				break
			case TestEvent.BeforeStep:
				this.logger.info('')
				this.logger.info(`===> Step '${label}'`)
				break
			case TestEvent.AfterStep:
				this.logger.info(`---> Step '${label}' finished`)
				break
			case TestEvent.StepSkipped:
				this.logger.info(`---- Step '${label}' skipped`)
				break
			case TestEvent.StepFailed:
				this.logger.error(`xxxx Step '${label}' failed`)
				break
		}
	}