switch-to-deno #1
5 changed files with 39 additions and 5 deletions
10
.woodpecker/.lint.yml
Normal file
10
.woodpecker/.lint.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
pipeline:
|
||||
lint:
|
||||
image: denoland/deno:${DENO_VERSION}
|
||||
commands:
|
||||
- deno ta
|
||||
- cargo clippy
|
||||
|
||||
matrix:
|
||||
DENO_VERSION:
|
||||
- 1.39.1
|
9
.woodpecker/.test.yml
Normal file
9
.woodpecker/.test.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
pipeline:
|
||||
test:
|
||||
image: denoland/deno:${DENO_VERSION}
|
||||
commands:
|
||||
- deno task test
|
||||
|
||||
matrix:
|
||||
DENO_VERSION:
|
||||
- 1.39.1
|
|
@ -9,5 +9,8 @@
|
|||
"test": "deno test --allow-net --parallel",
|
||||
"build": "deno run -A scripts/build_npm.ts 0.1.0",
|
||||
"publish": "cd npm && npm publish"
|
||||
},
|
||||
"lint": {
|
||||
"include": ["src/"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ export default class NatsAdaptor implements Adaptor {
|
|||
}
|
||||
|
||||
async stop(): Promise<void> {
|
||||
this.nc?.drain();
|
||||
await this.nc?.drain();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,11 @@ afterEach(async () => {
|
|||
await srv.stop();
|
||||
});
|
||||
|
||||
it("request success", async () => {
|
||||
it("request success", {
|
||||
sanitizeExit: false,
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
}, async () => {
|
||||
const dataExpected = "hello success";
|
||||
const statusCodeExpected = 200;
|
||||
|
||||
|
@ -41,7 +45,11 @@ it("request success", async () => {
|
|||
assertEquals(res.statusCode, statusCodeExpected);
|
||||
});
|
||||
|
||||
it("request error", async () => {
|
||||
it("request error", {
|
||||
sanitizeExit: false,
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
}, async () => {
|
||||
const dataExpected = "hello error";
|
||||
const statusCodeExpected = 500;
|
||||
|
||||
|
@ -56,11 +64,15 @@ it("request error", async () => {
|
|||
service: serviceName,
|
||||
subject: subject,
|
||||
data: dataExpected,
|
||||
});
|
||||
}, z.string());
|
||||
});
|
||||
});
|
||||
|
||||
it("request adaptor not found", async () => {
|
||||
it("request adaptor not found", {
|
||||
sanitizeExit: false,
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
}, async () => {
|
||||
const dataExpected = "hello success";
|
||||
const statusCodeExpected = 200;
|
||||
|
||||
|
|
Loading…
Reference in a new issue