Skip to content

Commit

Permalink
Add jest tests for new spec
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Sep 28, 2022
1 parent 54ad604 commit cf33599
Show file tree
Hide file tree
Showing 3 changed files with 677 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,10 @@ const installTransformsAssets = async (
await Promise.all(
destinationIndexTemplates
.map((destinationIndexTemplate) => {
const customMappings = transformsSpecifications
.get(destinationIndexTemplate.transformModuleId)
?.get('mappings');
const customMappings =
transformsSpecifications
.get(destinationIndexTemplate.transformModuleId)
?.get('mappings') ?? {};
const registryElasticsearch: RegistryElasticsearch = {
'index_template.settings': destinationIndexTemplate.template.settings,
'index_template.mappings': destinationIndexTemplate.template.mappings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../constants';
import { getAsset } from './common';
import { installTransforms } from './install';

describe('test transform install', () => {
describe('test transform install with legacy schema', () => {
let esClient: ReturnType<typeof elasticsearchClientMock.createElasticsearchClient>;
let savedObjectsClient: jest.Mocked<SavedObjectsClientContract>;
beforeEach(() => {
Expand Down
Loading

0 comments on commit cf33599

Please sign in to comment.