Skip to content

Commit d845f31

Browse files
author
Chris Dickinson
committed
fix: format fixes; lint fixes
1 parent 49e33ac commit d845f31

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

src/background-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ class HttpContext {
319319
return 0n;
320320
}
321321

322-
let { header, url: rawUrl, method } = req.json();
323-
method ??= 'GET';
322+
const { header, url: rawUrl, method: m } = req.json();
323+
const method = m ?? 'GET';
324324
const url = new URL(rawUrl);
325325

326326
const isAllowed = this.allowedHosts.some((allowedHost) => {

src/mod.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,6 @@ if (typeof WebAssembly === 'undefined') {
389389
});
390390

391391
test('http works as expected when host is allowed', async () => {
392-
const functions = {
393-
'extism:host/user': {
394-
async hello_world(context: CallContext, _off: bigint) {
395-
await new Promise((resolve) => setTimeout(resolve, 100));
396-
return context.store('it works');
397-
},
398-
},
399-
};
400-
401392
const plugin = await createPlugin(
402393
{ wasm: [{ name: 'http', url: 'http://localhost:8124/wasm/http.wasm' }] },
403394
{ useWasi: true, functions: {}, runInWorker: true, allowedHosts: ['*.typicode.com'] },

0 commit comments

Comments
 (0)