Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
soliury committed Apr 13, 2021
1 parent a618adc commit 14b87a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/WS/index.js
Expand Up @@ -55,7 +55,7 @@ class WsRpc extends IPC_WS {
this.socket.onclose = () => {
this._closed();
};
this.socket.onerror = (err) => {
this.socket.onerror = err => {
this._errored(err);
};
this.socket.onmessage = e => {
Expand Down
6 changes: 3 additions & 3 deletions test/packages/viteAPI/ws.js
Expand Up @@ -4,7 +4,7 @@ import Provider from '../../../src/viteAPI/provider';
import WS_RPC from '../../../src/WS';

describe('test ws provider', () => {
it('should trigger event when connect successfully', (done) => {
it('should trigger event when connect successfully', done => {
const wsServer = new WS_RPC('wss://node-tokyo.vite.net/ws', 2000, {
retryInterval: 1,
retryTimes: -1
Expand All @@ -14,12 +14,12 @@ describe('test ws provider', () => {
});
});

it('should trigger error event when connected failed', (done) => {
it('should trigger error event when connected failed', done => {
const wsServer = new WS_RPC('wss://no.vite.net/ws', 2000, {
retryInterval: 1,
retryTimes: -1
});
wsServer.on('error', (err) => {
wsServer.on('error', () => {
done();
});
});
Expand Down

0 comments on commit 14b87a6

Please sign in to comment.