fix: Placeholder for platform-deno
parent
85e6377929
commit
4c2a24377f
|
@ -68,6 +68,4 @@ jobs:
|
||||||
- run: npm run lint --if-present
|
- run: npm run lint --if-present
|
||||||
# TODO: Generate and publish a HTML artifact
|
# TODO: Generate and publish a HTML artifact
|
||||||
- run: npm start
|
- run: npm start
|
||||||
|
|
||||||
|
|
||||||
# vim: set et ts=2 sw=2:
|
# vim: set et ts=2 sw=2:
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# Comparing `fetch()` implementations
|
# Comparing `fetch()` implementations
|
||||||
|
|
||||||
A small project comparing `fetch()` implementations across various platforms
|
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`
|
- `node-fetch`
|
||||||
- Deno (TODO)
|
- Deno (TODO)
|
||||||
|
|
||||||
|
|
||||||
<!-- vim: set conceallevel=2 et ts=2 sw=2: -->
|
<!-- vim: set conceallevel=2 et ts=2 sw=2: -->
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
},
|
},
|
||||||
"xo": {
|
"xo": {
|
||||||
"prettier": true,
|
"prettier": true,
|
||||||
"globals": ["Request", "Response", "Headers", "fetch"]
|
"globals": [
|
||||||
|
"Request",
|
||||||
|
"Response",
|
||||||
|
"Headers",
|
||||||
|
"fetch"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ async function run() {
|
||||||
try {
|
try {
|
||||||
results[name] = await platforms[name].run(ctx, 'all');
|
results[name] = await platforms[name].run(ctx, 'all');
|
||||||
log.debug(name, results[name]);
|
log.debug(name, results[name]);
|
||||||
} catch (error: Error) {
|
} catch (error: unknown) {
|
||||||
log.error(name, error);
|
log.error(name, error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import cp from 'node:child_process';
|
||||||
// @ts-expect-error: Missing types
|
// @ts-expect-error: Missing types
|
||||||
import {binary} from 'deno-prebuilt';
|
import {binary} from 'deno-prebuilt';
|
||||||
|
|
||||||
|
@ -6,5 +7,13 @@ import {Platform, Result} from './types.js';
|
||||||
export default class PlatformDeno implements Platform {
|
export default class PlatformDeno implements Platform {
|
||||||
async run(): Promise<Result> {
|
async run(): Promise<Result> {
|
||||||
throw new Error('not implemented');
|
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