Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed May 29, 2020
1 parent 22f9b26 commit c4f7aa6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -6583,7 +6583,6 @@
"xpack.idxMgmt.indexTemplatesList.emptyPrompt.noIndexTemplatesTitle": "まだテンプレートがありません",
"xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesDescription": "テンプレートを読み込み中…",
"xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesErrorMessage": "テンプレートの読み込み中にエラーが発生",
"xpack.idxMgmt.indexTemplatesTable.systemIndexTemplatesSwitchLabel": "システムテンプレートを含める",
"xpack.idxMgmt.licenseCheckErrorMessage": "ライセンス確認失敗",
"xpack.idxMgmt.mappingsEditor.addFieldButtonLabel": "フィールドの追加",
"xpack.idxMgmt.mappingsEditor.addMultiFieldTooltipLabel": "同じフィールドを異なる方法でインデックスするために、マルチフィールドを追加します。",
Expand Down Expand Up @@ -7173,7 +7172,6 @@
"xpack.idxMgmt.templateList.table.actionEditDecription": "このテンプレートを編集します",
"xpack.idxMgmt.templateList.table.actionEditText": "編集",
"xpack.idxMgmt.templateList.table.aliasesColumnTitle": "エイリアス",
"xpack.idxMgmt.templateList.table.createTemplatesButtonLabel": "テンプレートを作成",
"xpack.idxMgmt.templateList.table.deleteManagedTemplateTooltip": "管理されているテンプレートは削除できません。",
"xpack.idxMgmt.templateList.table.deleteTemplatesButtonLabel": "{count, plural, one {テンプレート} other {テンプレート} }を削除",
"xpack.idxMgmt.templateList.table.ilmPolicyColumnDescription": "インデックスライフサイクルポリシー「{policyName}」",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -6586,7 +6586,6 @@
"xpack.idxMgmt.indexTemplatesList.emptyPrompt.noIndexTemplatesTitle": "您尚未有任何模板",
"xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesDescription": "正在加载模板……",
"xpack.idxMgmt.indexTemplatesList.loadingIndexTemplatesErrorMessage": "加载模板时出错",
"xpack.idxMgmt.indexTemplatesTable.systemIndexTemplatesSwitchLabel": "包括系统模板",
"xpack.idxMgmt.licenseCheckErrorMessage": "许可证检查失败",
"xpack.idxMgmt.mappingsEditor.addFieldButtonLabel": "添加字段",
"xpack.idxMgmt.mappingsEditor.addMultiFieldTooltipLabel": "添加多字段以使用不同的方式索引相同的字段。",
Expand Down Expand Up @@ -7177,7 +7176,6 @@
"xpack.idxMgmt.templateList.table.actionEditDecription": "编辑此模板",
"xpack.idxMgmt.templateList.table.actionEditText": "编辑",
"xpack.idxMgmt.templateList.table.aliasesColumnTitle": "别名",
"xpack.idxMgmt.templateList.table.createTemplatesButtonLabel": "创建模板",
"xpack.idxMgmt.templateList.table.deleteManagedTemplateTooltip": "您无法删除托管模板。",
"xpack.idxMgmt.templateList.table.deleteTemplatesButtonLabel": "删除{count, plural, one {模板} other {模板} }",
"xpack.idxMgmt.templateList.table.ilmPolicyColumnDescription": "“{policyName}”索引生命周期策略",
Expand Down
23 changes: 15 additions & 8 deletions x-pack/test_utils/stub_web_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
* you may not use this file except in compliance with the Elastic License.
*/

if (!window.Worker) {
// @ts-ignore we aren't honoring the real Worker spec here
window.Worker = function Worker() {
this.postMessage = jest.fn();
function stubWebWorker() {
if (!window.Worker) {
// @ts-ignore we aren't honoring the real Worker spec here
window.Worker = function Worker() {
this.postMessage = jest.fn();

// @ts-ignore TypeScript doesn't think this exists on the Worker interface
// https://developer.mozilla.org/en-US/docs/Web/API/Worker/terminate
this.terminate = jest.fn();
};
// @ts-ignore TypeScript doesn't think this exists on the Worker interface
// https://developer.mozilla.org/en-US/docs/Web/API/Worker/terminate
this.terminate = jest.fn();
};
}
}

stubWebWorker();

// Add an export to avoid TS complaining "stub_web_worker.ts" is not a module.
export { stubWebWorker };

0 comments on commit c4f7aa6

Please sign in to comment.