mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fix kbn/optimizer tests (#70827)
Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
parent
bd952721a4
commit
44925311fc
2 changed files with 74 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@ import { inspect } from 'util';
|
|||
|
||||
import cpy from 'cpy';
|
||||
import del from 'del';
|
||||
import { toArray, tap } from 'rxjs/operators';
|
||||
import { toArray, tap, filter } from 'rxjs/operators';
|
||||
import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils';
|
||||
import { runOptimizer, OptimizerConfig, OptimizerUpdate, logOptimizerState } from '@kbn/optimizer';
|
||||
|
||||
|
@ -63,8 +63,7 @@ afterAll(async () => {
|
|||
await del(TMP_DIR);
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/70762
|
||||
it.skip('builds expected bundles, saves bundle counts to metadata', async () => {
|
||||
it('builds expected bundles, saves bundle counts to metadata', async () => {
|
||||
const config = OptimizerConfig.create({
|
||||
repoRoot: MOCK_REPO_DIR,
|
||||
pluginScanDirs: [Path.resolve(MOCK_REPO_DIR, 'plugins')],
|
||||
|
@ -75,7 +74,11 @@ it.skip('builds expected bundles, saves bundle counts to metadata', async () =>
|
|||
expect(config).toMatchSnapshot('OptimizerConfig');
|
||||
|
||||
const msgs = await runOptimizer(config)
|
||||
.pipe(logOptimizerState(log, config), toArray())
|
||||
.pipe(
|
||||
logOptimizerState(log, config),
|
||||
filter((x) => x.event?.type !== 'worker stdio'),
|
||||
toArray()
|
||||
)
|
||||
.toPromise();
|
||||
|
||||
const assert = (statement: string, truth: boolean, altStates?: OptimizerUpdate[]) => {
|
||||
|
@ -168,8 +171,7 @@ it.skip('builds expected bundles, saves bundle counts to metadata', async () =>
|
|||
`);
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/70764
|
||||
it.skip('uses cache on second run and exist cleanly', async () => {
|
||||
it('uses cache on second run and exist cleanly', async () => {
|
||||
const config = OptimizerConfig.create({
|
||||
repoRoot: MOCK_REPO_DIR,
|
||||
pluginScanDirs: [Path.resolve(MOCK_REPO_DIR, 'plugins')],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue