Skip to content

Commit

Permalink
Simplify e2e environment types
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Jul 10, 2023
1 parent 81b5ecf commit a6c43ca
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions packages/calypso-e2e/src/jest-playwright-config/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
AllureRuntime,
AllureConfig,
} from '@automattic/jest-circus-allure-reporter';
import { EnvironmentContext } from '@jest/environment';
import { EnvironmentContext, JestEnvironmentConfig } from '@jest/environment';
import { parse as parseDocBlock } from 'jest-docblock';
import NodeEnvironment from 'jest-environment-node';
import {
Expand Down Expand Up @@ -56,22 +56,16 @@ class JestEnvironmentPlaywright extends NodeEnvironment {
/**
* Constructs the instance of the JestEnvironmentNode.
*
* @param {Config.ProjectConfig} config Jest configuration.
* @param {EnvironmentContext} context Jest execution context.
* @param config Jest configuration.
* @param context Jest execution context.
*/
constructor(
{
globalConfig,
projectConfig,
}: { globalConfig: Config.GlobalConfig; projectConfig: Config.ProjectConfig },
context: EnvironmentContext
) {
super( { globalConfig, projectConfig }, context );
constructor( config: JestEnvironmentConfig, context: EnvironmentContext ) {
super( config, context );

this.testFilePath = context.testPath;
this.testFilename = path.parse( context.testPath ).name;
this.testArtifactsPath = '';
this.allure = this.initializeAllureReporter( projectConfig );
this.allure = this.initializeAllureReporter( config.projectConfig );
}

/**
Expand Down

0 comments on commit a6c43ca

Please sign in to comment.