-
Notifications
You must be signed in to change notification settings - Fork 3
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 #1 from IuryPiva/master
Update dependencies, remove `--unstable` flag, add deno fmt and replace deprecated methods
- Loading branch information
Showing
11 changed files
with
265 additions
and
280 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 |
---|---|---|
@@ -1,2 +1 @@ | ||
.vscode/ | ||
.dsddb/ |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.import_intellisense_origins": { | ||
"https://deno.land": true | ||
}, | ||
} | ||
"deno.enable": true, | ||
"deno.suggest.imports.hosts": { | ||
"https://deno.land": true | ||
} | ||
} |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
export { createHash } from "https://deno.land/[email protected]/hash/mod.ts"; | ||
export { exists } from "https://deno.land/[email protected]/fs/mod.ts"; | ||
export { Md5 } from "https://deno.land/[email protected]/hash/md5.ts"; |
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,36 @@ | ||
import { DsDDB } from "./mod.ts"; | ||
import { assertExists, assertThrows } from "./test_deps.ts"; | ||
|
||
Deno.test("Empty DB", async () => { | ||
let db = new DsDDB(); | ||
await db.load(); | ||
await db.write(); | ||
|
||
assertThrows(() => Deno.readFileSync(db.storePath)); | ||
}); | ||
|
||
Deno.test("Simple Numer DB", async () => { | ||
let db = new DsDDB(); | ||
await db.load(); | ||
|
||
db.set("number1", 5); | ||
db.set("number2", 10); | ||
|
||
await db.write(); | ||
|
||
assertExists(Deno.readFileSync(db.storePath)); | ||
await Deno.remove(db.storePath); | ||
}); | ||
|
||
Deno.test("DB delete store", async () => { | ||
let db = new DsDDB(); | ||
await db.load(); | ||
|
||
db.set("number1", 5); | ||
db.set("number2", 10); | ||
|
||
await db.write(); | ||
assertExists(Deno.readFileSync(db.storePath)); | ||
await db.deleteStore(); | ||
assertThrows(() => Deno.readFileSync(db.storePath)); | ||
}); |
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 |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./src/dsddb.ts"; | ||
export * from "./src/dsddb.ts"; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.