fix: Placeholder for platform-deno
parent
85e6377929
commit
4c2a24377f
|
@ -68,6 +68,4 @@ jobs:
|
|||
- run: npm run lint --if-present
|
||||
# TODO: Generate and publish a HTML artifact
|
||||
- run: npm start
|
||||
|
||||
|
||||
# vim: set et ts=2 sw=2:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# Comparing `fetch()` implementations
|
||||
|
||||
A small project comparing `fetch()` implementations across various platforms
|
||||
|
@ -15,5 +14,4 @@ Browser testing is done using [`webdriver`](https://github.com/webdriverio/webdr
|
|||
- `node-fetch`
|
||||
- Deno (TODO)
|
||||
|
||||
|
||||
<!-- vim: set conceallevel=2 et ts=2 sw=2: -->
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
},
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"globals": ["Request", "Response", "Headers", "fetch"]
|
||||
"globals": [
|
||||
"Request",
|
||||
"Response",
|
||||
"Headers",
|
||||
"fetch"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ async function run() {
|
|||
try {
|
||||
results[name] = await platforms[name].run(ctx, 'all');
|
||||
log.debug(name, results[name]);
|
||||
} catch (error: Error) {
|
||||
} catch (error: unknown) {
|
||||
log.error(name, error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import cp from 'node:child_process';
|
||||
// @ts-expect-error: Missing types
|
||||
import {binary} from 'deno-prebuilt';
|
||||
|
||||
|
@ -6,5 +7,13 @@ import {Platform, Result} from './types.js';
|
|||
export default class PlatformDeno implements Platform {
|
||||
async run(): Promise<Result> {
|
||||
throw new Error('not implemented');
|
||||
/* eslint-disable no-unreachable */
|
||||
const child = cp.spawn(binary, []);
|
||||
await new Promise((resolve, reject) => {
|
||||
child.once('error', reject);
|
||||
child.once('spawn', resolve);
|
||||
});
|
||||
child.kill();
|
||||
/* eslint-enable no-unreachable */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue