Skip to content

Can't fire bootstrap #18

Closed
Closed
@nicostubi

Description

@nicostubi

Hello,

I struggle trying to have the bootstrap method firing.

I have added a console.log() in the bootstrap method, but when I launch tests using npm run run:tests, I don't see my console.log() appearing on my terminal. In my production project, I have added the code directly in the config file (codecept.conf.ts) and it is working fine, e.g.:

exports.config = {
	tests: './tests/*/**_test.ts',
	output: './tests/output',
	timeout: 60, // limit all tests in all suites to 60 secs
	helpers: {
		// some helpers ...
	},
	bootstrap: async () => {
		console.log('bootstrap working!'),
	},
	teardown: async () => {
		console.log('teardown working!'),
	plugins: {
		pauseOnFail: {},
		retryFailedStep: {
			enabled: true,
		},
		tryTo: {
			enabled: true,
		},
		screenshotOnFail: {
			enabled: true,
		},
	},
}

Any way to fix the sample project I've attached to include bootstrap and other methods in presettings.ts?
typescript-boilerplate-master.zip

Best Regards,
Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions