generated from CodrJS/ts-jsr-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slim deps/transistion to bson only; update readme; fix tests
- Loading branch information
DylanBulmer
committed
Jul 20, 2024
1 parent
caef334
commit cacb04d
Showing
16 changed files
with
45 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ import { User } from "jsr:@codr/models@^1"; | |
git clone [email protected]:CodrJS/models.git | ||
|
||
# Cache deno dependencies | ||
deno cache | ||
deno cache ./mod.ts | ||
|
||
# Format, lint, and test the code | ||
deno fmt | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
import { assert, assertEquals } from "jsr:@std/assert"; | ||
import { Organization } from "../mod.ts"; | ||
import { ObjectId } from "npm:bson"; | ||
|
||
Deno.test("Create organziation", function createOrganization() { | ||
const createdBy: ObjectId = new ObjectId(); | ||
const org = new Organization({ | ||
domains: ["localhost:3000"], | ||
name: "Demo Account", | ||
flags: { | ||
isActive: true, | ||
isDeleted: false, | ||
isDemo: true, | ||
}, | ||
slug: "demo", | ||
createdBy, | ||
}); | ||
|
||
assertEquals(org.toJSON().name, "Demo Account"); | ||
assertEquals(org.toJSON().slug, "demo"); | ||
assertEquals(org.toJSON().createdBy.toString(), createdBy.toString()); | ||
assertEquals(org.toJSON().flags.isActive, true); | ||
assertEquals(org.toJSON().flags.isDeleted, false); | ||
assertEquals(org.toJSON().flags.isDemo, true); | ||
assert(org.toJSON().domains.includes("localhost:3000")); | ||
}); |