diff options
Diffstat (limited to 'spec/frontend/repository/mixins/highlight_mixin_spec.js')
-rw-r--r-- | spec/frontend/repository/mixins/highlight_mixin_spec.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/frontend/repository/mixins/highlight_mixin_spec.js b/spec/frontend/repository/mixins/highlight_mixin_spec.js index 5f872749581..fd14f01747a 100644 --- a/spec/frontend/repository/mixins/highlight_mixin_spec.js +++ b/spec/frontend/repository/mixins/highlight_mixin_spec.js @@ -31,10 +31,13 @@ describe('HighlightMixin', () => { const dummyComponent = { mixins: [highlightMixin], - inject: { highlightWorker: { default: workerMock } }, + inject: { + highlightWorker: { default: workerMock }, + glFeatures: { default: { highlightJsWorker: true } }, + }, template: '<div>{{chunks[0]?.highlightedContent}}</div>', created() { - this.initHighlightWorker({ rawTextBlob, simpleViewer, language }); + this.initHighlightWorker({ rawTextBlob, simpleViewer, language, fileType }); }, methods: { onError: onErrorMock }, }; @@ -84,6 +87,7 @@ describe('HighlightMixin', () => { expect(workerMock.postMessage.mock.calls[1][0]).toMatchObject({ content: rawTextBlob, language: languageMock, + fileType: TEXT_FILE_TYPE, }); }); }); |