diff --git a/test/views/whisper_view_test.js b/ts/test-electron/views/whisper_view_test.ts similarity index 80% rename from test/views/whisper_view_test.js rename to ts/test-electron/views/whisper_view_test.ts index a93f6c9341..c538bc60bf 100644 --- a/test/views/whisper_view_test.js +++ b/ts/test-electron/views/whisper_view_test.ts @@ -1,11 +1,11 @@ -// Copyright 2015-2020 Signal Messenger, LLC +// Copyright 2015-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -/* global Whisper */ +import { assert } from 'chai'; describe('Whisper.View', () => { it('renders a template with render_attributes', () => { - const ViewClass = Whisper.View.extend({ + const ViewClass = window.Whisper.View.extend({ template: '
{{ variable }}
', render_attributes: { variable: 'value', @@ -17,7 +17,7 @@ describe('Whisper.View', () => { assert.strictEqual(view.$el.html(), '
value
'); }); it('renders a template with no render_attributes', () => { - const ViewClass = Whisper.View.extend({ + const ViewClass = window.Whisper.View.extend({ template: '
static text
', }); @@ -26,7 +26,7 @@ describe('Whisper.View', () => { assert.strictEqual(view.$el.html(), '
static text
'); }); it('renders a template function with render_attributes function', () => { - const ViewClass = Whisper.View.extend({ + const ViewClass = window.Whisper.View.extend({ template() { return '
{{ variable }}
'; },