Skip to content

Commit f906b89

Browse files
committed
refactor: ci name & add a test
1 parent b06154f commit f906b89

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test
22
on: [push, pull_request]
33
jobs:
44
lint:
5-
name: ESLint & Prettier
5+
name: ESLint & Prettier & Tests
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout repository

tests/test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ db.on("end", () => console.log("ℹ️ Database connection ended"));
3636
(async () => {
3737
await db.connect();
3838

39-
console.time("Time to test (excludes connection & end)");
40-
41-
await db.set("userInfo", { difficulty: "Easy" });
39+
console.time("⏱ Time to test (excludes connection & end)");
4240

4341
await db.set("users.0", {
4442
username: "Zero",
@@ -86,7 +84,11 @@ db.on("end", () => console.log("ℹ️ Database connection ended"));
8684
// Test 13
8785
new Test(await db.type("users.0.points")).test("number");
8886

89-
console.timeEnd("Time to test (excludes connection & end)");
87+
await db.set("users.0", { username: "One" });
88+
// Test 14
89+
new Test(await db.get("users.0.username")).test("One");
90+
91+
console.timeEnd("⏱ Time to test (excludes connection & end)");
9092

9193
await db.drop();
9294
await db.end();

0 commit comments

Comments
 (0)