Upgrade Storybook

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Jamie Kyle 2023-10-11 12:06:43 -07:00 committed by GitHub
parent 8c966dfbd8
commit 502ea174ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
328 changed files with 10863 additions and 12432 deletions

View file

@ -29,7 +29,7 @@ describe('WebSocket-Resource', () => {
const NOW = Date.now();
beforeEach(function beforeEach() {
beforeEach(function (this: Mocha.Context) {
this.sandbox = sinon.createSandbox();
this.clock = this.sandbox.useFakeTimers({
now: NOW,
@ -42,7 +42,7 @@ describe('WebSocket-Resource', () => {
.callsFake(clearTimeout);
});
afterEach(function afterEach() {
afterEach(function (this: Mocha.Context) {
this.sandbox.restore();
});
@ -145,7 +145,7 @@ describe('WebSocket-Resource', () => {
resource.close();
});
it('force closes the connection', function test(done) {
it('force closes the connection', function (this: Mocha.Context, done) {
const socket = new FakeSocket();
const resource = new WebSocketResource(socket as WebSocket, {
@ -161,7 +161,7 @@ describe('WebSocket-Resource', () => {
});
describe('with a keepalive config', () => {
it('sends keepalives once a minute', function test(done) {
it('sends keepalives once a minute', function (this: Mocha.Context, done) {
const socket = new FakeSocket();
sinon.stub(socket, 'sendBytes').callsFake(data => {
@ -180,7 +180,7 @@ describe('WebSocket-Resource', () => {
this.clock.next();
});
it('optionally disconnects if no response', function thisNeeded1(done) {
it('optionally disconnects if no response', function (this: Mocha.Context, done) {
const socket = new FakeSocket();
sinon.stub(socket, 'close').callsFake(() => done());
@ -197,7 +197,7 @@ describe('WebSocket-Resource', () => {
this.clock.next();
});
it('optionally disconnects if suspended', function thisNeeded1(done) {
it('optionally disconnects if suspended', function (this: Mocha.Context, done) {
const socket = new FakeSocket();
sinon.stub(socket, 'close').callsFake(() => done());
@ -212,7 +212,7 @@ describe('WebSocket-Resource', () => {
this.clock.next();
});
it('allows resetting the keepalive timer', function thisNeeded2(done) {
it('allows resetting the keepalive timer', function (this: Mocha.Context, done) {
const startTime = Date.now();
const socket = new FakeSocket();