Upgrade Storybook
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
8c966dfbd8
commit
502ea174ab
328 changed files with 10863 additions and 12432 deletions
|
@ -7,15 +7,15 @@ import * as sinon from 'sinon';
|
|||
import { getUserAgent } from '../../util/getUserAgent';
|
||||
|
||||
describe('getUserAgent', () => {
|
||||
beforeEach(function beforeEach() {
|
||||
beforeEach(function (this: Mocha.Context) {
|
||||
this.sandbox = sinon.createSandbox();
|
||||
});
|
||||
|
||||
afterEach(function afterEach() {
|
||||
afterEach(function (this: Mocha.Context) {
|
||||
this.sandbox.restore();
|
||||
});
|
||||
|
||||
it('returns the right User-Agent on Windows', function test() {
|
||||
it('returns the right User-Agent on Windows', function (this: Mocha.Context) {
|
||||
this.sandbox.stub(process, 'platform').get(() => 'win32');
|
||||
assert.strictEqual(
|
||||
getUserAgent('1.2.3', '10.0.22000'),
|
||||
|
@ -23,7 +23,7 @@ describe('getUserAgent', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('returns the right User-Agent on macOS', function test() {
|
||||
it('returns the right User-Agent on macOS', function (this: Mocha.Context) {
|
||||
this.sandbox.stub(process, 'platform').get(() => 'darwin');
|
||||
assert.strictEqual(
|
||||
getUserAgent('1.2.3', '21.5.0'),
|
||||
|
@ -31,7 +31,7 @@ describe('getUserAgent', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('returns the right User-Agent on Linux', function test() {
|
||||
it('returns the right User-Agent on Linux', function (this: Mocha.Context) {
|
||||
this.sandbox.stub(process, 'platform').get(() => 'linux');
|
||||
assert.strictEqual(
|
||||
getUserAgent('1.2.3', '20.04'),
|
||||
|
@ -39,7 +39,7 @@ describe('getUserAgent', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('omits the platform on unsupported platforms', function test() {
|
||||
it('omits the platform on unsupported platforms', function (this: Mocha.Context) {
|
||||
this.sandbox.stub(process, 'platform').get(() => 'freebsd');
|
||||
assert.strictEqual(getUserAgent('1.2.3', '13.1'), 'Signal-Desktop/1.2.3');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue