Skip to content

Commit

Permalink
feat(test): remove deprecated testing configs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Aug 4, 2020
1 parent b5cba6a commit fb8a02b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
6 changes: 1 addition & 5 deletions src/compiler/config/validate-testing.ts
@@ -1,5 +1,5 @@
import * as d from '../../declarations';
import { buildError, buildWarn, isString } from '@utils';
import { buildError, isString } from '@utils';
import { isAbsolute, join, basename, dirname } from 'path';
import { isLocalModule } from '../sys/resolve/resolve-utils';
import { isOutputTargetDist, isOutputTargetWww } from '../output-targets/output-utils';
Expand Down Expand Up @@ -84,10 +84,6 @@ export const validateTesting = (config: d.Config, diagnostics: d.Diagnostic[]) =
}

testing.setupFilesAfterEnv.unshift(join(config.sys.getCompilerExecutingPath(), '..', '..', 'testing', 'jest-setuptestframework.js'));
if (testing.setupTestFrameworkScriptFile) {
const err = buildWarn(diagnostics);
err.messageText = `setupTestFrameworkScriptFile has been deprecated.`;
}

if (isString(testing.testEnvironment)) {
if (!isAbsolute(testing.testEnvironment) && isLocalModule(testing.testEnvironment)) {
Expand Down
4 changes: 0 additions & 4 deletions src/declarations/stencil-public-compiler.ts
Expand Up @@ -1454,10 +1454,6 @@ export interface JestConfig {

setupFilesAfterEnv?: string[];

/**
* @deprecated Use setupFilesAfterEnv instead.
*/
setupTestFrameworkScriptFile?: string;
snapshotSerializers?: any[];
testEnvironment?: string;
testEnvironmentOptions?: any;
Expand Down
5 changes: 0 additions & 5 deletions src/testing/spec-page.ts
Expand Up @@ -126,11 +126,6 @@ export async function newSpecPage(opts: NewSpecPageOptions): Promise<SpecPage> {
BUILD.safari10 = false;
BUILD.attachStyles = !!opts.attachStyles;

(page as any).flush = () => {
console.warn(`DEPRECATED: page.flush(), please use page.waitForChanges() instead`);
return page.waitForChanges();
};

if (typeof opts.url === 'string') {
page.win.location.href = opts.url;
}
Expand Down

0 comments on commit fb8a02b

Please sign in to comment.