-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #274 from hyper63/twilson63/feat-allow-load-on-ada…
…pter-242 feat: enabled plugin load method to support promises (#242)
- Loading branch information
Showing
8 changed files
with
61 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,7 @@ The core package validates the config schema and plugin schemas | |
``` | ||
./scripts/test.sh | ||
``` | ||
|
||
## License | ||
|
||
Apache 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import opine from "https://x.nest.land/[email protected]/mod.js"; | ||
import dndb from "https://x.nest.land/[email protected]/mod.js"; | ||
import memory from "https://x.nest.land/[email protected]/mod.js"; | ||
import { superdeno } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
|
||
import core from "./mod.js"; | ||
|
||
const test = Deno.test; | ||
Deno.env.set("DENO_ENV", "test"); | ||
|
||
const config = { | ||
app: opine, | ||
adapters: [ | ||
{ port: "data", plugins: [dndb("./data/foo.db")] }, | ||
{ port: "cache", plugins: [memory()] }, | ||
], | ||
middleware: [], | ||
}; | ||
|
||
test("build hyper core", async () => { | ||
const app = await core(config); | ||
const res = await superdeno(app) | ||
.get("/"); | ||
//console.log(res.body) | ||
|
||
assertEquals(res.body.name, "hyper63"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters