Skip to content

Commit

Permalink
[ci] yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and actions-user committed Jun 14, 2021
1 parent 016833a commit ddd86f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async function createSnowpack(astroConfig: AstroConfig, options: CreateSnowpackO
hmrPort?: number;
} = {
astroConfig,
resolvePackageUrl
resolvePackageUrl,
};

const mountOptions = {
Expand Down
10 changes: 4 additions & 6 deletions packages/astro/test/astro-hmr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HMR('Honors the user provided port', async ({ runtime }) => {
if (result.error) throw new Error(result.error);

const html = result.contents;
assert.ok(/window\.HMR_WEBSOCKET_URL = window\.HMR_WEBSOCKET_URL || 'ws:\/\/localhost:5555'/.test(html), 'Uses the user\'s websocket port');
assert.ok(/window\.HMR_WEBSOCKET_URL = window\.HMR_WEBSOCKET_URL || 'ws:\/\/localhost:5555'/.test(html), "Uses the user's websocket port");
});

HMR('Does not override script added by the user', async ({ runtime }) => {
Expand All @@ -25,10 +25,8 @@ HMR('Does not override script added by the user', async ({ runtime }) => {

const html = result.contents;

assert.ok(!/window\.HMR_WEBSOCKET_URL = 'ws:\/\/localhost:3333'/.test(html),
'Users script included');
assert.ok(/window\.HMR_WEBSOCKET_URL = window\.HMR_WEBSOCKET_URL || 'ws:\/\/localhost:5555'/.test(html),
'Our script defers to the port already being set');
assert.ok(!/window\.HMR_WEBSOCKET_URL = 'ws:\/\/localhost:3333'/.test(html), 'Users script included');
assert.ok(/window\.HMR_WEBSOCKET_URL = window\.HMR_WEBSOCKET_URL || 'ws:\/\/localhost:5555'/.test(html), 'Our script defers to the port already being set');
});

HMR.run();
HMR.run();

0 comments on commit ddd86f8

Please sign in to comment.