Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley committed Nov 12, 2020
1 parent 50bba72 commit 0155fce
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-es-archiver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"@kbn/dev-utils": "link:../kbn-dev-utils",
"@kbn/test": "link:../kbn-test"
}
}
}
2 changes: 1 addition & 1 deletion packages/kbn-test/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"main": "../target/jest",
"types": "../target/types/jest/index.d.ts"
}
}
2 changes: 1 addition & 1 deletion packages/kbn-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"@kbn/expect": "link:../kbn-expect",
"@kbn/utils": "link:../kbn-utils"
}
}
}
2 changes: 0 additions & 2 deletions packages/kbn-test/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,3 @@ export { runFailedTestsReporterCli } from './failed_tests_reporter';
export { CI_PARALLEL_PROCESS_PREFIX } from './ci_parallel_process_prefix';

export * from './functional_test_runner';

export * from './jest';
2 changes: 0 additions & 2 deletions packages/kbn-test/src/jest/utils/enzyme_helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ export const mountHook = <Args extends {}, HookValue extends any>(
};
};

export const nextTick = () => new Promise((res) => process.nextTick(res));

export function shallowWithI18nProvider<T>(child: ReactElement<T>) {
const wrapped = shallow(<I18nProvider>{child}</I18nProvider>);
const name = typeof child.type === 'string' ? child.type : child.type.name;
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-test/src/jest/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ export * from './stub_web_worker';
export * from './testbed';

export const nextTick = () => new Promise((res) => process.nextTick(res));

export const wait = (time = 0) => new Promise((resolve) => setTimeout(resolve, time));
1 change: 1 addition & 0 deletions packages/kbn-test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"index.d.ts"
],
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-test",
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "./target/types",
Expand Down
3 changes: 2 additions & 1 deletion src/dev/jest/config.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import preset from '@kbn/test/jest-preset';
import config from './config';

export default {
Expand All @@ -26,7 +27,7 @@ export default {
'**/integration_tests/**/*.test.ts',
'**/integration_tests/**/*.test.tsx',
],
testPathIgnorePatterns: config.testPathIgnorePatterns.filter(
testPathIgnorePatterns: preset.testPathIgnorePatterns.filter(
(pattern) => !pattern.includes('integration_tests')
),
reporters: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'brace/mode/json';
// brace/ace uses the Worker class, which is not currently provided by JSDOM.
// This is not required for the tests to pass, but it rather suppresses lengthy
// warnings in the console which adds unnecessary noise to the test output.
import 'test_utils/stub_web_worker';
import '@kbn/test/target/jest/utils/stub_web_worker';

import React from 'react';
import { act } from 'react-dom/test-utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { JSONRuleEditor } from './json_rule_editor';
// brace/ace uses the Worker class, which is not currently provided by JSDOM.
// This is not required for the tests to pass, but it rather suppresses lengthy
// warnings in the console which adds unnecessary noise to the test output.
import 'test_utils/stub_web_worker';
import '@kbn/test/target/jest/utils/stub_web_worker';

import { AllRule, FieldRule } from '../../model';
import { EuiErrorBoundary } from '@elastic/eui';
import { DocumentationLinksService } from '../../documentation_links';
Expand Down

0 comments on commit 0155fce

Please sign in to comment.