This commit is contained in:
SimonFJ20 2024-09-20 00:43:24 +02:00
parent 8feeba0dd1
commit 46737d8f0f
5 changed files with 37 additions and 1 deletions

View File

@ -1,5 +1,9 @@
{
"fmt": {
"indentWidth": 4
},
"tasks": {
"check": "deno check main.ts",
"test": "deno test"
}
}

21
deno.lock Normal file
View File

@ -0,0 +1,21 @@
{
"version": "3",
"packages": {
"specifiers": {
"jsr:@std/assert": "jsr:@std/assert@1.0.5",
"jsr:@std/internal@^1.0.3": "jsr:@std/internal@1.0.3"
},
"jsr": {
"@std/assert@1.0.5": {
"integrity": "e37da8e4033490ce613eec4ac1d78dba1faf5b02a3f6c573a28f15365b9b440f",
"dependencies": [
"jsr:@std/internal@^1.0.3"
]
},
"@std/internal@1.0.3": {
"integrity": "208e9b94a3d5649bd880e9ca38b885ab7651ab5b5303a56ed25de4755fb7b11e"
}
}
},
"remote": {}
}

View File

@ -1 +1,3 @@
console.log("hello world");
import { message } from "./message.ts";
console.log(message());

3
message.ts Normal file
View File

@ -0,0 +1,3 @@
export function message(): string {
return "hello world";
}

6
message_test.ts Normal file
View File

@ -0,0 +1,6 @@
import { assertEquals } from "jsr:@std/assert";
import { message } from "./message.ts";
Deno.test("message is correct", () => {
assertEquals(message(), "hello world");
});